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
########################################################### | |
# net/socket_http.rb | |
########################################################### | |
module Net | |
# Overrides the connect method to simply connect to a unix domain socket. | |
class SocketHttp < HTTP | |
attr_reader :socket_path | |
# URI should be a relative URI giving the path on the HTTP server. |
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
[dance_card_test] pwd 11:41:55 ☁ master ☂ ✖ ⚡ ✭ | |
/Users/tyler/src/dev/dance_card_test | |
[dance_card_test] open github-mac://openrepo//`pwd` 11:41:57 ☁ master ☂ ✖ ⚡ ✭ | |
The file /Users/tyler/src/dev/dance_card_test/github-mac:/openrepo/Users/tyler/src/dev/dance_card_test does not exist. | |
[dance_card_test] open github-mac://openrepo//Users/tyler/src/dev/dance_card_test 11:42:30 ☁ master ☂ ✖ ⚡ ✭ | |
The file /Users/tyler/src/dev/dance_card_test/github-mac:/openrepo/Users/tyler/src/dev/dance_card_test does not exist. | |
[dance_card_test] open github-mac://openRepo/Users/tyler/src/dev/dance_card_test 11:43:02 ☁ master ☂ ✖ ⚡ ✭ | |
The file /Users/tyler/src/dev/dance_card_test/github-mac:/openRepo/Users/tyler/src/dev/dance_card_test does not exist. | |
[dance_card_test] open github-mac://openRepo//Users/tyler/src/dev/dance_card_test 11:43:24 ☁ master ☂ ✖ ⚡ ✭ |
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
public class DBHelper { | |
private static String serverip = "xxx"; | |
private static String database = "xxx"; | |
private static String dbuser = "xxx"; | |
private static String password = "xxx"; | |
public static void closeConnection(Connection connection) { | |
try { if (connection != null) connection.close(); } | |
catch (Exception e) { | |
// Do error stuff |
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 { | |
padding-top: 50px; | |
padding-left: 80px; } | |
.flash { | |
position: absolute; | |
left: 0%; | |
font-size: 50pt; | |
font-family: 'VT323', cursive; | |
top: 0; } |
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
# Write our own Gemfile. | |
file 'Gemfile', <<-CODE | |
source 'https://rubygems.org' | |
gem 'rails', '4.0.0.beta1' | |
group :assets do | |
gem 'sass-rails', '~> 4.0.0.beta1' | |
gem 'coffee-rails', '~> 4.0.0.beta1' |
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
source 'https://rubygems.org' | |
gem 'rails', '4.0.0.beta1' | |
gem 'sqlite3' | |
group :assets do | |
gem 'sass-rails', '~> 4.0.0.beta1' | |
gem 'coffee-rails', '~> 4.0.0.beta1' | |
gem 'uglifier', '>= 1.0.3' |
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 Game | |
constructor: (@size, @mines) -> | |
@size ?= 8 | |
@mines ?= 10 | |
@boom = false | |
@squares = (new Square(true) for num in [1..@mines]) | |
for num in [@mines..(@size*@size)-1] | |
@squares.push(new Square(false)) | |
@shuffle() |
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 LunarDate | |
constructor: (@year, @month, @day, @hour) -> | |
i = Date.parse(@getSolarDateString()) | |
the_data = null | |
for data in LunarDate.date_table | |
if i < data[0] | |
days_diff = Math.floor((i - the_data[0]) / (24 * 60 * 60 * 1000)) | |
@epoch = the_data[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
var LunarDate; | |
LunarDate = (function() { | |
function LunarDate(year, month, day, hour) { | |
var data, days_diff, i, the_data, _i, _len, _ref; | |
this.year = year; | |
this.month = month; | |
this.day = day; |
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
[~] nslookup 13:36:52 | |
> server ns1.xname.org | |
Default server: ns1.xname.org | |
Address: 178.33.255.252#53 | |
> www.polestar-astrology.com. | |
Server: ns1.xname.org | |
Address: 178.33.255.252#53 | |
** server can't find www.polestar-astrology.com: SERVFAIL | |
> polestar-astrology.com. |