GET
- assing valiables
- exist
- not exist (if necessary or have possible)
- render_template
- assign valiable exist
- not exist (if necessary or have possible)
$ rails new hoge -T --skip-bundle | |
$ vim ./.rvmrc | |
rvm use 1.9.3@hoge | |
$ vim ./.pryrc | |
begin | |
require 'hirb' | |
rescue LoadError | |
# Missing goodies, bummer |
// Detect links pattern | |
var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; | |
// Wrap the matched strings with `<span class="fake-link"></span>` | |
$('body').html($('body').html().replace(exp, "<span class='fake-link'>$1</span>")); | |
$('.fake-link').each(function() { | |
// Extra job: Check if parent is an anchor | |
if ($(this).parent().is('a')) { | |
// If `true`, then unwrap the original anchor which has been written by default from `.fake-link` |
# OS X | |
.DS_Store | |
# Xcode | |
*.xcodeproj/* | |
!*.xcodeproj/project.pbxproj | |
*.xcworkspace/* | |
!*.xcworkspace/contents.xcworkspacedata | |
build/ | |
*.pbxuser |
#import <Repro/ReproInsight.h> | |
... | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
// Override point for customization after application launch. | |
[ReproInsight setupWithToken:@"YOUR_APP_TOKEN"]; |
function () { | |
TouchSequencesController = { | |
sequences: [], | |
runningSequences: [], | |
preShowTouchTime: .3, | |
nextTouchSequence: 0, | |
layer: new Kinetic.Layer, | |
isPaused: !1, | |
scale: 1, | |
create: function (e, t, n, i) { |
// | |
// ViewController.m | |
// TestAlert | |
// | |
// Created by akira on 6/10/14. | |
// Copyright (c) 2014 akira. All rights reserved. | |
// | |
#import "ViewController.h" |
require 'logger' | |
require 'rails' | |
require 'net/http' | |
require 'uri' | |
require 'pry' | |
class Daemon | |
def self.run &block | |
new &block | |
end |
# ec2-ip | |
function ec2-ip() { | |
if [[ $1 == "" ]]; then | |
PERCOL=percol | |
else | |
PERCOL="percol --query $1" | |
fi | |
instances | eval $PERCOL | awk '{ print $1 }' | |
} |
#import "UIViewController+RPRIS.h" | |
#import <objc/runtime.h> | |
@implementation UIViewController (Foo) | |
+ (void)swizzlingMethodViewWillApper | |
{ | |
Method originalMethod = class_getInstanceMethod(self, viewWillApper:); | |
Method swizzledMethod = class_getInstanceMethod(self, foo_viewWillApper:); | |
method_exchangeImplementations(originalMethod, swizzledMethod); |