This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" NeoVIM Configuration | |
" Map the leader key to SPACE | |
let mapleader="\<SPACE>" | |
nnoremap <SPACE> <nop> | |
" Set options {{{ | |
set title " Set window title to file | |
set showcmd " Show (partial) command in status line | |
set showmatch " Show matching brackets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- encoding: utf-8 -*- | |
from __future__ import unicode_literals, print_function | |
""" | |
Usage: python millionenlos.py <symbols.txt> | |
Shows today's winning symbols from Millionenlos.ch; | |
Or shows your winnings when given a file | |
containing winning symbols for each day. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Python34 < Formula | |
desc "Interpreted, interactive, object-oriented programming language" | |
homepage "https://www.python.org/" | |
url "https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tar.xz" | |
sha256 "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8" | |
revision 2 | |
bottle do | |
revision 1 | |
sha256 "58ae656ea0e46d63d7bd13bc4662032e0f27f614e003f3b06314f3688fcb0685" => :el_capitan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
'use strict'; | |
var size = 10000; | |
var sides = 1000000; | |
var padding = 50; | |
var path = polygon(size / 2 + padding, size / 2 + padding, size / 2, sides) | |
.map(function (p) { return p.x + ',' + p.y; }) | |
.join(' '); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tadastaffregister(request): | |
if request.method == "POST": | |
start_date = request.POST['start_date'] | |
end_date = request.POST['end_date'] | |
result = [] | |
date = 0 | |
staff_member = [] | |
staff = [] | |
list_item = [] | |
total = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.db import models, migrations | |
class Migration(migrations.Migration): | |
dependencies = [ | |
('offers', '0001_initial'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* License: WTFPL - http://www.wtfpl.net/ | |
* | |
* Usage: element.addEventListener('keydown', inputHistory()); | |
*/ | |
function inputHistory(max_history) { | |
var PREV = 38, NEXT = 40, ENTER = 13, | |
history = [''], current = 0; | |
if (!max_history) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INT_BYTES = 8 # but note that javascript only does 2^53 | |
int2bytes = (x) -> | |
if x > Number.MAX_SAFE_INTEGER | |
throw new Error "Number is larger than Number.MAX_SAFE_INTEGER (2⁵³-1)!" | |
bytes = [] | |
i = INT_BYTES | |
loop | |
bytes[--i] = x & 0xff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jwa ~> dig A ju.io | |
; <<>> DiG 9.8.3-P1 <<>> A ju.io | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39104 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;ju.io. IN A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
ARCH_VERSION="2014.12.01" | |
ARCH_FILE="archlinux-bootstrap-$ARCH_VERSION-x86_64.tar.gz" | |
ARCH_BOOTSTRAP="http://archlinux.mirrors.ovh.net/archlinux/iso/$ARCH_VERSION/$ARCH_FILE" | |
ARCH_SUMS="http://archlinux.mirrors.ovh.net/archlinux/iso/$ARCH_VERSION/sha1sums.txt" | |
# download bootstrap image | |
cd /tmp | |
wget $ARCH_BOOTSTRAP |