Skip to content

Instantly share code, notes, and snippets.

View shohey1226's full-sized avatar

Shohei Kameda shohey1226

View GitHub Profile
javascript: (function(_HaH) {
var originalTitle = document.title;
var hintKeys = new String('asdfghjkl');
var choices = [];
var choice = '';
var xpath = '//a[@href]|//input[not(@type=\x22hidden\x22)]|//textarea|//select|//img[@onclick]|//button';
xpath += '|' + xpath.replace(/\/\//g, '//xhtml:');
var defaultType = 'HaHxlink';
function defaultAction(e) {
e.focus();
@kevinold
kevinold / gist:253518
Created December 10, 2009 17:54 — forked from jshirley/gist:253512
plackup init script
#!/bin/sh
# Start a Plack daemon.
PATH=/bin:/usr/bin:/sbin:/usr/sbin:$HOME/perl5/bin
DAEMON="$HOME/perl5/bin/plackup"
NAME="AppName"
CWD=`pwd`
# Defaults
RUN="no"
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@connor
connor / .jshintrc.js
Created January 11, 2012 22:20
jshintrc example
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension
{
// Settings
"passfail" : false, // Stop on first error.
"maxerr" : 100, // Maximum error before stopping.
// Predefined globals whom JSHint will ignore.
"browser" : true, // Standard browser globals e.g. `window`, `document`.
@dnpp73
dnpp73 / xcode4shortcut.md
Created March 20, 2012 12:16
Xcode 4 で俺がよく使うショトカまとめ

作業エリアのショトカなど


  • 左のエリアのアレ切り替え
    Cmd + [0-7]

  • 右のエリアのアレ切り替え
    Cmd + Option + [0-2]

  • 右のエリアのアレ切り替えその二

@chsh
chsh / facebook-app-template.rb
Created June 17, 2012 04:44
Rails3 template to generate facebook app.
# facebootstrap: Rails3 template
app_h_name = app_name.gsub(/_/, '-')
app_c_name = app_name.classify
ruby_version = '1.9.3-p286'
repository_path = "[email protected]:chsh/#{app_h_name}.git"
target_branch = 'develop' # or master etc...
deploy_server = '[YOUR DEPLOY SERVER]'
target_mode = 'edge' # or 'live' or 'develop' etc...
# additional_path = '/usr/pgsql-9.1/bin'
@Gab-km
Gab-km / github-flow.ja.md
Last active July 1, 2025 15:44 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@misterbrownlee
misterbrownlee / jenkins-notes.md
Created September 12, 2012 18:10
Jenkins setup

I just had to set up Jenkins to use GitHub. My notes (to myself, mostly):

Detailed Instructions

For setting up Jenkins to build GitHub projects. This assumes some ability to manage Jenkins, use the command line, set up a utility LDAP account, etc. Please share or improve this Gist as needed.

Install Jenkins Plugins

@joelclermont
joelclermont / gist:3735026
Created September 17, 2012 00:56
using yepnope for twitter js and css with local fallback
function cssLoaded(href) {
var cssFound = false;
for (var i = 0; i < document.styleSheets.length; i++) {
sheet = document.styleSheets[i];
if (sheet['href'].indexOf(href) >= 0 && sheet['cssRules'].length > 0) {
cssFound = true;
}
};
@adamneilson
adamneilson / tumblr_gist_iphone_fix.css
Last active December 18, 2015 00:09
Gists don't seem to display correctly on an iPhone when embedded in a Tumblr post. After a bit of digging I've cobbled together the following CSS which seems to fix the issue.
/** corrections for displaying gists in iOS **/
.gist {
font-family: Consolas,"Liberation Mono",Courier,monospace;
font-size: 12px !important;
line-height:20px !important;
}
.gist .line,
.gist .line-number {
font-family: Consolas,"Liberation Mono",Courier,monospace;
font-size: 12px !important;