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
| def convert(command: String, fileIn: String, fileOut: String): Unit = { | |
| val input = new FileInputStream(fileIn) | |
| val output = new FileOutputStream(fileOut) | |
| val converter = new MagickConverter("(no name)", command) | |
| try { | |
| converter.process(input, output) | |
| } finally { | |
| input.close() | |
| output.close() | |
| } |
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
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-shade-plugin</artifactId> | |
| <version>1.5</version> | |
| <executions> | |
| <execution> | |
| <phase>package</phase> | |
| <goals> | |
| <goal>shade</goal> | |
| </goals> |
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
| scala> val m = Map(1 -> 2) | |
| m: scala.collection.immutable.Map[Int,Int] = Map(1 -> 2) | |
| scala> m.get("1") | |
| <console>:9: error: type mismatch; | |
| found : java.lang.String("1") | |
| required: Int | |
| m.get("1") | |
| ^ |
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
| #foo { | |
| text-align: center; | |
| ul { | |
| display: inline-block; | |
| list-style: none; | |
| margin: 0 auto | |
| width: 100%; | |
| } |
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/ruby | |
| require 'open-uri' | |
| if(!ARGV[0]); puts "Usage: ant.rb [name]"; exit end | |
| if(open("http://antarcticabar.com/NameNight.html") {|f| f.read.include? ARGV[0]}); puts "Fuck yeah " + ARGV[0] + "!" end |
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
| function genode() { | |
| if [[ $# -eq 0 ]]; then | |
| echo "Usage: genode <project>" | |
| else | |
| proj=$1; file=${proj//-/_} | |
| mkdir -p $proj/lib && touch $proj/lib/$file.js | |
| echo -e "{\n \"name\": \"$proj\",\n \"version\": \"0.0.1\"\n}" > $proj/package.json | |
| echo -e "module.exports = require('./lib/$file');" > $proj/index.js | |
| echo $proj > $proj/README.md | |
| fi |
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 bash | |
| # mostly from http://word.bitly.com/post/31921713978/static-analysis | |
| function cfmt { | |
| if [[ $# -ne 1 ]]; then | |
| echo "Usage: cfmt <file>" | |
| else | |
| astyle \ | |
| --style=1tbs \ | |
| --lineend=linux \ | |
| --convert-tabs \ |
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
| [1] pry(main)> class Foo; end | |
| => nil | |
| [2] pry(main)> Foo.foo | |
| NoMethodError: undefined method `foo' for Foo:Class | |
| from (pry):3:in `<main>' | |
| [3] pry(main)> class Foo; def self.foo; puts "foo"; end; end | |
| => nil | |
| [4] pry(main)> Foo.foo | |
| foo | |
| => nil |
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 connect = require("connect"), | |
| director = require("director"), | |
| union = require("union"); | |
| var router = new director.http.Router(); | |
| router.get('/', function () { | |
| this.res.writeHead(200, { 'Content-Type': 'text/plain' }) | |
| this.res.end('Hello, World!\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
| let g:ctrlp_map = '<c-p>' | |
| let g:ctrlp_cmd = 'CtrlP' | |
| let g:ctrlp_custom_ignore = { | |
| \ 'dir': '\v[\/]\.(git|hg|svn)$|node_modules', | |
| \ 'file': '\v\.(exe|so|dll|DS_Store)$', | |
| \ } |
OlderNewer