This file contains 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 | |
# jekyll Starts and stops Jekyll | |
# | |
# | |
# chkconfig: - 85 15 | |
# description: Jekyll is a Ruby based website caching engine | |
# processname: jekyll | |
# pidfile: /var/run/jekyll.pid | |
# Configure your values here |
This file contains 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
diff -ruN snes9x-1.53-src.orig/macosx/mac-cart.mm snes9x-1.53-src/macosx/mac-cart.mm | |
--- snes9x-1.53-src.orig/macosx/mac-cart.mm 2011-04-24 22:38:10.000000000 +0900 | |
+++ snes9x-1.53-src/macosx/mac-cart.mm 2014-12-06 15:06:35.000000000 +0900 | |
@@ -214,7 +214,7 @@ | |
FSRef ref; | |
Boolean reply; | |
char name[PATH_MAX + 1]; | |
-#ifdef MAC_LEOPARD_TIGER_PANTHER_SUPPORT | |
+#if defined(MAC_LEOPARD_TIGER_PANTHER_SUPPORT) || defined(MAC_YOSEMITE_SUPPORT) | |
IBNibRef customNib; |
This file contains 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
# dig @staite.net old.staite.net | |
; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> @staite.net old.staite.net | |
; (1 server found) | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5594 | |
;; flags: qr aa rd; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 | |
;; WARNING: recursion requested but not available |
This file contains 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 'faraday' | |
require 'faraday_middleware' | |
class Client | |
JSON_CONTENT = 'application/json' | |
attr_reader :conn | |
# Initialize a new client | |
def initialize | |
@base_uri = 'https://api.example.org' |
This file contains 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
- (NSString *)tableView:(UITableView *)tableView titleForSwipeAccessoryButtonForRowAtIndexPath:(NSIndexPath *)indexPath { | |
return @"More"; | |
} | |
- (void)tableView:(UITableView *)tableView swipeAccessoryButtonPushedForRowAtIndexPath:(NSIndexPath *)indexPath { | |
NSLog(@"I wanted to be a pretty public API, but then time ran out and they forgot me..."); | |
// Hide the More/Delete menu. | |
[self setEditing:NO animated:YES]; | |
} |
This file contains 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
Here is a simple jQuery plugin to make a table header fixed on top when window is scrolled. | |
Using the code from twitter bootstrap documentation page, this code is customized for table header. | |
Create the table with following layout - | |
<table class="table-fixed-header"> | |
<thead class="header"> | |
<tr> | |
<th>Column 1</th> | |
<th>Column 2</th> | |
<th>Column 3</th> |
This file contains 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 'nokogiri', '~>1.6' | |
gem 'aws-sdk', '~> 2' |
This file contains 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
... | |
gem 'kaminari' | |
gem 'ransack' | |
.. |
This file contains 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
# This script comes from Pry Everywhere by Luca Pette | |
# http://lucapette.com/pry/pry-everywhere/ | |
# https://github.com/carlhuda/bundler/issues/183#issuecomment-1149953 | |
if defined?(::Bundler) | |
global_gemset = ENV['GEM_PATH'].split(':').grep(/ruby.*@global/).first | |
if global_gemset | |
all_global_gem_paths = Dir.glob("#{global_gemset}/gems/*") | |
all_global_gem_paths.each do |p| | |
gem_path = "#{p}/lib" |
This file contains 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
# DelegateToAll. Like delegate.rb from Ruby's std lib but lets you have multiple target/delegate objects. | |
require 'delegate' | |
class DelegatorToAll < Delegator | |
# Pass in the _obj_ to delegate method calls to. All methods supported by | |
# _obj_ will be delegated to. | |
# | |
def initialize(*targets) | |
__setobj__(targets) |
OlderNewer