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
| #!/bin/bash | |
| exit 1 | |
| # 30GB flash device on /dev/sdb | |
| sgdisk -Z \ | |
| -n 1:0:+512M -t 1:ef00 -c 1:bootefi \ | |
| -n 2:0:+2G -t 2:8200 -c 2:swap \ | |
| -n 3:0:0 -t 3:8303 -c 3:root \ | |
| -p /dev/sdb |
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
| #!/bin/bash | |
| set -e | |
| dir="$1" | |
| cd "$dir" | |
| file=".travis.yml" | |
| # ensure we have an empty staging area before we start committing | |
| cache=$(git diff --cached) | |
| if [[ -n "${cache// }" ]]; then |
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
| #!/bin/bash | |
| set -e | |
| # Export the main window: | |
| XWINDOW=$(xdotool search --class Magicka) | |
| # helpers | |
| mousemove() { | |
| xdotool mousemove --window $XWINDOW $1 $2 | |
| } |
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 debian:jessie | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| ca-certificates \ | |
| curl \ | |
| binutils-dev \ | |
| libmad0-dev \ | |
| libgtk2.0-dev \ | |
| libasound-dev \ |
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
| var seeds = [ | |
| // top 8 seeds | |
| 'BRZ', // brazil | |
| 'SPA', // spain | |
| 'GER', // germany | |
| 'ARG', // argentina | |
| 'COL', // columbia | |
| 'BEL', // belgium | |
| 'URU', // uruguay | |
| 'SWI', // switzerland |
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
| var r1 = /foo/ // 207 | |
| , r2 = /k$/ // 208 | |
| , r3 = /^[a-f]*$/ // 202 | |
| , r4 = /.(..).*\1/ // 201 | |
| , r5 = /^(?!.*(.)(.)\2\1)/ // 193 | |
| , r6 = /^(.)[^p].*\1$/ // 177 | |
| , r7 = /^(?!(xx+)\1+$)/ // 286 | |
| , r8 = /(.)(.\1){3}/ // 199 | |
| , r9 = /^.{5}[^e]?$/ // 199 | |
| , r10 = /^[378][12479]|00($|[369]|1[25])|55|2[347]/ // 589 |
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
| // Create a SMTP transport object | |
| var nodemailer = require('nodemailer'); | |
| var transport = nodemailer.createTransport("SMTP", { | |
| service: 'Gmail', | |
| auth: { | |
| user: "clux.nodemailer@gmail.com", | |
| pass: "mailpass" | |
| } | |
| }); | |
| var mailStr = function (str) { |
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
| var domready = require('domready') | |
| , bean = require('bean') // events | |
| , bonzo = require('bonzo') // DOM wrapper/manipulation | |
| , request = require('superagent/superagent') | |
| , qwery = require('qwery') // css selectors | |
| , slice = Array.prototype.slice; | |
| // Attach events API to the prototype of DOM wrapper: | |
| var aug = {}; | |
| ['on', 'off', 'one', 'add', 'fire', 'clone'].forEach(function (k) { |
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
| var classes = [Object, Array, String, RegExp, Date, Number, Function]; | |
| var nonClasses = [Math, JSON, console]; | |
| classes.concat(nonClasses).forEach(function (o) { | |
| Object.freeze(o); | |
| }); | |
| classes.forEach(function (o) { | |
| Object.freeze(o.prototype); | |
| }); |
NewerOlder