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 | |
# This script will automatically export all the Balsamiq mock files to PDF and bundle them up | |
# into a nice PDF. Just drop this script into the folder containing the mock files and | |
# execute it from the command-line | |
# | |
# For the PDF to work, you'd need to install "prawn" and "prawn-fast-png" gem, otherwise the PDF | |
# creation will be very slow. | |
# | |
# Currently this script has been tested with Balsamiq Next.161 build (05/28/2010) |
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 'net/ftp' | |
CONTENT_SERVER_DOMAIN_NAME = "one-of-the-ftp-server.thought-sauce.com.hk" | |
CONTENT_SERVER_FTP_LOGIN = "saucy-ftp-server-login" | |
CONTENT_SERVER_FTP_PASSWORD = "saucy-ftp-server-password" | |
# LOGIN and LIST available files at default home directory | |
Net::FTP.open(CONTENT_SERVER_DOMAIN_NAME, CONTENT_SERVER_FTP_LOGIN, CONTENT_SERVER_FTP_PASSWORD) do |ftp| | |
files = ftp.list |
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
upstream redmine { | |
server unix:///var/run/redmine.sock; | |
} | |
server { | |
listen 80; | |
server_name work.eoemobile.com; # change to match your URL | |
root /datas/www/redmine/current/public; # I assume your app is located at this location | |
location / { |
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
# | |
# lib/mongoid/counter_cache.rb | |
# ruby | |
# | |
# Created by Zhang Alex on 2011-06-17. | |
# Copyright 2011 __ZhangHanDong__. All rights reserved. | |
# | |
# =================================== | |
# class Forum | |
# references_many :topics |
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 id in `mysqladmin processlist | grep -i locked | awk '{print $1}'` | |
do | |
mysqladmin kill ${id} | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title> Learning about Bacjbone.js </title> | |
</head> | |
<body> | |
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<script src="http://documentcloud.github.com/backbone/backbone-min.js"></script> | |
<script type="text/javascript"> |
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
#sudo vi /etc/hosts | |
#C:\WINDOWS\system32\drivers\etc\hosts | |
208.43.202.50 www.dropbox.com | |
174.129.11.212 dl.dropbox.com | |
184.73.163.57 dl-web.dropbox.com |
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
publicbooleanonKeyDown(intkeyCode, KeyEventevent) { | |
if ((keyCode==KeyEvent.KEYCODE_BACK) &&mWebView.canGoBack() | |
{ mWebView.goBack(); | |
return true; | |
} | |
return super.onKeyDown(keyCode, event); | |
} |
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 'fileutils' | |
require 'date' | |
require 'yaml' | |
require 'rexml/document' | |
include REXML | |
doc = Document.new File.new(ARGV[0]) | |
FileUtils.mkdir_p "_posts" |
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
{ "hasvisible" : false, | |
"next_cursor" : 3417063424927923, | |
"previous_cursor" : 0, | |
"statuses" : [ { "comments_count" : 3, | |
"created_at" : "Sat Feb 25 21:03:20 +0800 2012", | |
"favorited" : false, | |
"geo" : null, | |
"id" : 3417063983118436, | |
"idstr" : "3417063983118436", | |
"in_reply_to_screen_name" : "", |
NewerOlder