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
window.addEventListener('deviceorientation', function(event) { | |
console.log(event.alpha + ' : ' + event.beta + ' : ' + event.gamma); | |
}); |
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
Earthquake.init do | |
output do |item| | |
if item["event"] == 'favorite' | |
async_e { | |
twitter.user_timeline(:screen_name => item["source"]["screen_name"]).each{|k, v| | |
twitter.favorite k["id"] | |
} | |
} | |
end | |
end |
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
var context = new webkitAudioContext(); | |
oscillator = context.createOscillator(); | |
oscillator.connect(context.destination); | |
oscillator.noteOn(0); |
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
$ sudo vi /private/etc/hosts |
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
# -*- coding: utf-8 -*- | |
Earthquake.init do | |
array = [ | |
174, | |
128146, | |
128657, | |
128192, | |
127906, | |
128508, |
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
$ find ./ -type f -name "*.xxx" -delete |
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
# -*- coding: utf-8 -*- | |
#MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM | |
# | |
# C A U T I O N | |
# | |
# this plugin DELETE a tweet if somebody fav your tweet | |
# | |
# このぷらぐいんはふぁぼられるとさくじょするぷらぐいんです | |
# | |
#MMMMMMMMMMMMMMMMMMMMMMXkl;.. ..':d0WMMMMMMMMMMMMMMMMMMMMM |
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
/hoge を除外 | |
<LocationMatch /(?!hoge)> | |
</LocationMatch> |
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
> function MyGorge() { | |
this.isHard = true; | |
} | |
undefined | |
> MyGorge.prototype.getHard = function() { | |
return this.isHard; | |
} | |
function () { | |
return this.isHard; |
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 'sprite_factory' | |
namespace :assets do | |
desc 'recreate sprite images and css' | |
task :resprite => :environment do | |
Dir.glob('app/assets/images/icons/*.svg').each do |svg_file| | |
%x(convert -antialias -background transparent #{svg_file} -resize 15x14 #{File.dirname svg_file}/#{File.basename(svg_file).gsub(/\.svg\z/, ".png")} ) | |
end | |
SpriteFactory.cssurl = "image-url('$IMAGE')" |
NewerOlder