Skip to content

Instantly share code, notes, and snippets.

View timchunght's full-sized avatar

Timothy Chung timchunght

View GitHub Profile
@kalbasit
kalbasit / das_download.rb
Created February 27, 2012 23:37 — forked from maca/das_download.rb
Script to download all Destroy All Software screencasts, account needed
#! /usr/bin/env ruby
# usage:
# $ das_download.rb email password [download_directory]
require 'mechanize'
# gem 'mechanize-progressbar'
email = ARGV[0] or raise('Please provide the email address for your account')
password = ARGV[1] or raise('Please provide the password for your account')
path = (ARGV[2] || './').gsub /\//,''
@alex-zige
alex-zige / gist:5795358
Last active June 8, 2023 07:49
Rails Rspec API Testing Notes

Rails Rspec APIs Testing Notes

Folders Structure

  spec
  |--- apis #do not put into controllers folder. 
        |--- your_api_test_spec.rb  
  |--- controllers
  |--- models
  |--- factories
 |--- views
@julionc
julionc / 00.howto_install_phantomjs.md
Last active November 18, 2024 17:45
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@ardan-bkennedy
ardan-bkennedy / GoMgoSample-1.go
Last active February 27, 2021 08:31
Sample Go and MGO example
type (
// BuoyCondition contains information for an individual station.
BuoyCondition struct {
WindSpeed float64 `bson:"wind_speed_milehour"`
WindDirection int `bson:"wind_direction_degnorth"`
WindGust float64 `bson:"gust_wind_speed_milehour"`
}
// BuoyLocation contains the buoy's location.
BuoyLocation struct {
@jashmenn
jashmenn / gist:9811198
Created March 27, 2014 16:10
escrowexample.txt
FROM: https://people.xiph.org/~greg/escrowexample.txt
2-of-2 escrow example
Carbide81 wants to pay carbide80 50tnbtc but prevent carebide80 from cheating him.
First each party creates a new address, and then shares them. Then uses the
resulting addresses to make a p2sh address (begins with '3' for bitcoin,
'2' for testnet) that requires both parties to sign to release:
@jonasmalacofilho
jonasmalacofilho / MS Office 2010 on Ubuntu 13.10.md
Last active September 27, 2023 13:26
Guide for installing MS Office 2010 on Ubuntu 13.10 (using Wine)

Installing Microsoft Office 2010 on Ubuntu 13.10/14.04

Results

Word works. Excel works.(1) PowerPoint works.

Access and Outlook were not tested.

@redism
redism / client.js
Created April 25, 2014 09:41
Simple socket.io server performance test
/**
* A simple socket.io client for performance benchmark
*
* Created by redism on 2014. 4. 22..
*/
var SocketIO = require('socket.io-client'),
argv = require('optimist').argv;
var n = argv.n || 10;
@thinkclay
thinkclay / server.go
Last active September 2, 2024 03:48
Basic Encryption and Decryption with a Golang Web Server Application
package main
import (
"crypto/aes"
"crypto/cipher"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"net/http"
class WebkitToPng
def self.create(urls, options={})
urls.each do |url|
puts "convert #{url} to #{options[:dir]}"
url.sub!('//', "//#{options[:auth]}@") if options[:auth]
op = "-F -D #{options[:dir]} -o #{url.split('/').last}"
op += " --user-agent='#{user_agent}'" if options[:mobile]
exec(url, op)
end
@ryoco
ryoco / .gitignore
Last active October 22, 2015 06:48
pdf to image with Go
/*.swp
/*.pdf
/*.png
.DS_Store