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
| mkdir -p ~/.vim/{ftdetect,indent,syntax} && for d in ftdetect indent syntax ; do wget --no-check-certificate -O ~/.vim/$d/scala.vim https://raw.github.com/scala/scala-dist/master/tool-support/src/vim/$d/scala.vim; done |
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
| sqlite3 ~/Library/Mail/V2/MailData/Envelope\ Index vacuum; |
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
| # send data which is kept in a file through HTTP Post method | |
| curl -i -X POST -F "json=@data.json" localhost:8080/save | |
| # send data through HTTP Post method | |
| curl -i -X POST -d json='{"key":"value"}' localhost:8080/save | |
| # send binary file through HTTP Post method | |
| curl -i -X POST -F data=@filepath localhost:8080/save |
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
| require 'sinatra/base' | |
| require 'openssl' | |
| require 'webrick' | |
| require 'webrick/https' | |
| class App1 < Sinatra::Base | |
| get '/' do | |
| 'app1' | |
| end | |
| 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
| #!/usr/bin/env ruby | |
| require 'webrick' | |
| server = WEBrick::HTTPServer.new :Port => 80 | |
| dir = (ARGV.length > 0 ? ARGV[0] : './') | |
| server.mount "/", WEBrick::HTTPServlet::FileHandler, dir | |
| trap('INT') { server.stop } | |
| server.start |
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
| require 'rubygems' | |
| require 'rubygems/package' | |
| require 'zlib' | |
| require 'fileutils' | |
| module Util | |
| module Tar | |
| # Creates a tar file in memory recursively | |
| # from the given path. | |
| # |
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/sh | |
| STORAGE="/var/lib/libvirt/images" | |
| NAME="ubuntu1204-64" | |
| #MAC="54:52:00:6C:46:01" | |
| #IMAGE=$STORAGE/$NAME.img | |
| IMAGE=/root/ubuntu1204-64.qcow2 | |
| LOCATION="http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/" | |
| #LOCATION="http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/" | |
| #NET_BRIDGE=br0 |
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
| body { | |
| font-family: Helvetica, arial, sans-serif; | |
| font-size: 14px; | |
| line-height: 1.6; | |
| padding-top: 10px; | |
| padding-bottom: 10px; | |
| background-color: white; | |
| padding: 30px; } | |
| body > *:first-child { |
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 ruby | |
| require 'rubygems' | |
| require 'roo' | |
| pwd = File.dirname(__FILE__) | |
| Dir.glob("#{pwd}/*.xls") do |file| | |
| file_path = "#{pwd}/#{file}" | |
| file_basename = File.basename(file, ".xls") | |
| xls = Excel.new(file_path) |
OlderNewer