Skip to content

Instantly share code, notes, and snippets.

View gluntn's full-sized avatar

William gluntn

  • Bodø, Norway
View GitHub Profile
@gluntn
gluntn / lol.java
Created January 17, 2019 11:18
fd
public boolean equals(Object o) {
if(!(o instanceof Triangle) || o == null) return false;
Triangle that = (Triangle)o;
return this.side1 == that.side1 && this.side2 == that.side2 && this.side3 == that.side3;
}
@gluntn
gluntn / fdfd
Created November 3, 2018 18:17
fdfd
Starting laradock_mysql_1 ... done
Attaching to laradock_mysql_1
mysql_1 | Initializing database
mysql_1 | 2018-11-03T18:17:25.235995Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
mysql_1 | 2018-11-03T18:17:25.236058Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
mysql_1 | 2018-11-03T18:17:25.236315Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.12) initializing of server in progress as process 27
mysql_1 | 2018-11-03T18:17:25.240868Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
mysql_1 | mbind: Operation not p
### MySQL ################################################
mysql:
build:
context: ./mysql
args:
- MYSQL_VERSION=${MYSQL_VERSION}
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
set shell=/bin/bash
set nocompatible
set tabstop=2
set expandtab
set shiftwidth=2
set softtabstop=2
set number
filetype off
@gluntn
gluntn / help.vue
Last active July 25, 2018 07:41
wefwefw
// HTML Element
select#chooseMode(v-model="selectedMode")
option(value="M") Mottak
option(value="T") Varetelling
option(value="K") Svinn
// Vuex getter and setters
selectedMode: {
get () {
return this.$store.state.selectedMode;
@gluntn
gluntn / component.vue
Last active July 23, 2018 13:52
why tho
<template lang="pug">
div#root(:style="{ background: bgColor }")
li.element
div.clickable(@click="openProduct")
span#name {{ name }}
span#amount {{ current_stock }}
span#expand(v-html="htmlTag")
div.expandable(:class="{expanded: isExpanded}")
div
input#amount-input(type="text"
@gluntn
gluntn / scriptVue.js
Created February 16, 2018 09:48
doesnt make sense vue
export default {
name: 'App',
components: {
ListElement
},
data() {
return {
list: []
# People.py
from Person import Person
class People:
def __init__(self):
self.data = []
find = lambda x: True if isPerson(x) and x in self.data else False
valid = lambda x: True if isinstance(x, Person) else False
@for $n from 0 through 5
h#{($n + 1)}
font-size: (2 - ($n * 0.15))+em
&.bold
font-weight: 700
&.upper
text-transform: uppercase
&.primary
color: $primary
import datetime
from django.db import models
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
# Create your models here.
class Question(models.Model):
question_text = models.CharField(max_length=200)
pub_date = models.DateTimeField('Date published')