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
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
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 | |
| # References | |
| # http://www.computerhope.com/unix/nc.htm#03 | |
| # https://github.com/daniloegea/netcat | |
| # http://unix.stackexchange.com/questions/26715/how-can-i-communicate-with-a-unix-domain-socket-via-the-shell-on-debian-squeeze | |
| # http://unix.stackexchange.com/questions/33924/write-inside-a-socket-open-by-another-process-in-linux/33982#33982 | |
| # http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip | |
| # http://www.dest-unreach.org/socat/ | |
| # http://stuff.mit.edu/afs/sipb/machine/penguin-lust/src/socat-1.7.1.2/EXAMPLES |
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
| class Perm { | |
| //最終的に返すもの(組み合わせのパターン) | |
| private var patterns:Array<Array<Int>>; | |
| //入力数字列 | |
| private var in_ary:Array<Int>; | |
| /** | |
| * コンストラクタ | |
| * @param in_ary 入力数字列 | |
| */ |
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
| For more details, see : | |
| SMACCS and Fifty Shades of BEM (http://blog.kaelig.fr/post/48196348743/fifty-shades-of-bem) | |
| prefix-ComponentName | |
| prefix-ComponentName-MODIFIERNAME | |
| prefix-ComponentName-subObject | |
| prefix-ComponentName-subObject-MODIFIERNAME | |
| p- Page specific (class applied on the body element), very useful for static pages where maintainability is not at stake — should be avoided in the application itself (e.g.: p-Homepage). |
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
| import precog.macro.ValueClass; | |
| class ABC implements ValueClass { | |
| var a: Int; | |
| var b: Bool; | |
| var c: String; | |
| } | |
| /* | |
| class ABC extends ValueClass { |
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
| package ; | |
| abstract JsonMap<T>({ }) from {} { | |
| public function new() this = {}; | |
| public function exists(key:String) return Reflect.hasField(this, key); | |
| @:arrayAccess public function get(key:String) return Reflect.field(this, key); | |
| @:arrayAccess public function set(key:String, value:T):T { | |
| Reflect.setField(this, key, value); | |
| return value; | |
| } |
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
| import sys.FileSystem; | |
| import sys.io.File; | |
| /** | |
| Haxe port of nekoboot.neko for creating executables from neko bytecode. | |
| Original version: https://github.com/HaxeFoundation/neko/blob/master/src/tools/nekoboot.neko | |
| Usage : nekoboot <file.n> | |
| */ |
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
| # Stick this in lib/tasks/assets.rake or similar | |
| # | |
| # A bug was introduced in rails in 7f1a666d causing the whole application cache | |
| # to be cleared everytime a precompile is run, but it is not neccesary and just | |
| # slows down precompiling. | |
| # | |
| # Secondary consequences are the clearing of the whole cache, which if using | |
| # the default file cache could cause an application level performance hit. | |
| # | |
| # This is already fixed in sprockets-rails for rails 4, but we patch here for |
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
| package ; | |
| class Main implements tink.lang.Cls { | |
| static function main() | |
| @with(tinx.node.Http.server(2000)) | |
| @on(request) | |
| request.respond().end('hello world') | |
| } |
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 | |
| # I wasn't happy with any of the GitHub libraries for Python that I tried so I | |
| # just used the GitHub API directly. If someone would like to rewrite this | |
| # using a library please be my guest | |
| from __future__ import unicode_literals | |
| import argparse | |
| import base64 |