- aaaaa
alert('aaa'); alert('hello');
#!/bin/sh | |
# | |
# color | |
# | |
RES_COL=60 | |
MOVE_TO_COL="echo -en \\033[${RES_COL}G" | |
SETCOLOR_SUCCESS="echo -en \\033[1;32m" | |
SETCOLOR_FAILURE="echo -en \\033[1;31m" | |
SETCOLOR_WARNING="echo -en \\033[1;33m" |
#!/usr/bin/env perl | |
=head1 Examples | |
$ tail -f access_log | perl colorize.pl | |
$ plackup app.psgi 2>&1 | perl colorize.pl | |
=cut | |
use strict; |
var a = {aaa: 1, bbb: 2, ccc: 3}; | |
var b = {ddd: 4, eee: 5}; | |
var Hash = function(hash){ | |
this.hash = hash; | |
}; | |
Hash.prototype.merge = function(target) { | |
for (var i in target) { | |
if (typeof target[i] === 'function') { continue; } | |
if (typeof target[i] === 'object') { continue; } |
#!/bin/sh | |
ID=$1 | |
curl http://pastebin.com/Kc9ng18h | grep $ID | |
curl http://pastebin.com/vCMndK2L | grep $ID | |
curl http://pastebin.com/JdQkuYwG | grep $ID | |
curl http://pastebin.com/fw43srjY | grep $ID | |
curl http://pastebin.com/jv4LBjPX | grep $ID |
module ActionView | |
module Helpers | |
class DateTimeSelector | |
# Override | |
# クレジットカード用に年を2桁で表示する "use_short_year" オプションを追加した | |
def select_year | |
if !@datetime || @datetime == 0 | |
val = '1' | |
middle_year = Date.today.year | |
else |
module Mongoid | |
module MultiParameterAttributes | |
protected | |
# Override mongoid / lib / mongoid / multi_parameter_attributes.rb | |
def instantiate_object(field, values_with_empty_parameters) | |
return nil if values_with_empty_parameters.all? { |v| v.nil? } || !field | |
values = values_with_empty_parameters.collect { |v| v.nil? ? 1 : v } | |
klass = field.type | |
if klass == DateTime || klass == Date || klass == Time |
echo "[Oh My Zsh] Would you like to check for updates?" | |
echo "Type Y to update oh-my-zsh: \c" | |
read line | |
if [ "$line" = Y ] || [ "$line" = y ] | |
then | |
_upgrade_zsh | |
fi |
$ ruby -pe 'gsub(/^.+;| .+$/,"")' ~/.zsh-history | sort | uniq -c | sort -nr | head -30 |
#!/bin/zsh | |
case "$1" in | |
test) | |
TYPE=$1 | |
;; | |
clean) | |
TYPE=$1 | |
;; | |
*) |