$ uname -r
This file contains hidden or 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
| from kubernetes import client, config | |
| import datetime | |
| with open('/run/secrets/kubernetes.io/serviceaccount/namespace', 'r') as ns: | |
| namespace = ns.read().strip() | |
| # Reads config from in-container token / cert | |
| config.load_incluster_config() |
This file contains hidden or 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
| <template> | |
| <v-dialog v-model="dialog" :max-width="options.width" :style="{ zIndex: options.zIndex }" @keydown.esc="cancel"> | |
| <v-card> | |
| <v-toolbar dark :color="options.color" dense flat> | |
| <v-toolbar-title class="white--text">{{ title }}</v-toolbar-title> | |
| </v-toolbar> | |
| <v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text> | |
| <v-card-actions class="pt-0"> | |
| <v-spacer></v-spacer> | |
| <v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn> |
This file contains hidden or 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
| * |
This file contains hidden or 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 | |
| import psycopg2 | |
| import sys | |
| """ | |
| Drop all tables of database you given. | |
| """ | |
| try: |
This file contains hidden or 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
| echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list | |
| wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
| sudo apt-get update | |
| sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y | |
| sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'" | |
| sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'" | |
| sudo su - postgres -c "service postgresql stop" | |
| sudo su - postgres -c '/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"' | |
This file contains hidden or 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
| <html> | |
| <head> | |
| <title>Dithering Test</title> | |
| </head> | |
| <body> | |
| <canvas></canvas> | |
| <script> | |
| var canvas = document.getElementsByTagName("canvas")[0]; |
This file contains hidden or 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
| //lsauer.com lo sauer 2012 - CC-BY-SA v3 | |
| //see also: http://www.daylight.com/dayhtml/doc/theory/theory.finger.html | |
| //description: JavaScript/Coffescript implementation for computing TANIMOTO Coefficients | |
| //implementation #1: parallelization amenable, map-reduce like | |
| //heavily depending on JavaScripts's dynamic type casting model | |
| Tanimoto = (key1, key2) -> | |
| nfA = key1.split("").sum() or 0 | |
| nfB = key2.split("").sum() or 0 | |
| nfAB = key1.split("").map((e, i, a) -> | |
| e & key2[i] |
As configured in my dotfiles.
start new:
tmux
start new with session name: