This file contains hidden or 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
apps = `heroku apps`.split("\n") | |
apps.each do |app| | |
next if app.include? "My Apps" | |
app = app.split(" ")[0] | |
gems = `heroku addons --app #{app}`.split("\n") | |
gems.each do |gem| | |
if gem.include? "memcache:" | |
puts "#{app} is using #{gem}" | |
end | |
end |
This file contains hidden or 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
javascript:%20var%20x=%20$(%22.content%22).find(%22a%22).each(function()%7Bvar%20href=$(this).attr(%22href%22);if((!$(this).hasClass(%22drowsapMorphed%22))%20&&%20($(this).next(%22.drowsapMorphed%22).length==0)%20&&%20href%20&&%20(href.indexOf('imgur')%3E=0%20%7C%7C%20href.indexOf('jpeg')%3E=0%20%7C%7C%20href.indexOf('jpg')%3E=0%20%7C%7C%20href.indexOf('png')%3E=0))%7Bvar%20ext%20=(href.indexOf('imgur')%3E=0%20&&%20href.indexOf('jpg')%3C0%20&&%20href.indexOf('png')%3C0)%20?%20'.jpg'%20:'';%20var%20img%20=%20$(%22%3Ca%20class='drowsapMorphed'%20href='%22+href+%22'%20target='blank'%20style='display:block'%3E%3Cimg%20style='display:block;max-width:780px;'%20src='%22+href+%20ext+%22'%20/%3E%3C/a%3E%22);$(this).after(img);%7D%7D); |
This file contains hidden or 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(){ | |
$('*[data-repeat]').each(function(){ | |
var n = $(this).data('repeat'); | |
var parent = $(this).parent(); | |
self = $(this); | |
for (var i = 0; i < n; i++) { | |
self.after(self.clone()); | |
} | |
}) | |
}); |
This file contains hidden or 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
## The quick-and-nasty CVE-2013-0156 Heroku inspector! | |
## Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku | |
## Download and run using: | |
## ruby heroku-CVE-2013-0156.rb | |
`heroku list`.split("\n").each do |app| | |
app = app.strip | |
# Some "heroku apps" lines have === formatting for grouping. They're not apps. | |
next if app[0..2] == "===" |
This file contains hidden or 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
-- volume up 10 | |
set current_volume to output volume of (get volume settings) | |
if current_volume is less than 100 then | |
set current_volume to current_volume + 10 | |
end if | |
set volume output volume current_volume |
This file contains hidden or 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
#!/usr/bin/ruby | |
puts `pwd` | |
Dir.chdir File.dirname(__FILE__) | |
puts `pwd` | |
# Servor client for @theriothq. | |
# Be careful moving things up and down as some strings cause deadlocks. |
This file contains hidden or 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
property baseURL : "http://statusboard.dev/song?" | |
if application "Spotify" is running then | |
tell application "Spotify" | |
set theTrack to name of the current track | |
set theArtist to artist of the current track | |
set theAlbum to album of the current track | |
set theurl to spotify url of the current track | |
try | |
do shell script "/usr/local/bin/wget --delete-after \"" & baseURL & "&t=" & theTrack & "&a=" & theArtist & "&al=" & theAlbum & "\"" |
This file contains hidden or 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
http://t.co/@"style="font-size:999999px;z-index:100;"onmouseover="setInterval(function(){$('a[onmouseover]').hide();},200)"/ |
This file contains hidden or 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
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= @%H - %LD %d %LM - %c" | |
autodetach on # Autodetach session on hangup instead of terminating screen completely | |
startup_message off # Turn off the splash screen | |
defscrollback 30000 | |
term screen-256color | |
# terminfo and termcap for nice 256 color terminal | |
# allow bold colors - necessary for some reason |
This file contains hidden or 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
# In your crontab: | |
* * * * * ruby ~/run.rb | |
# in ~/run.rb | |
12.times do | |
uptime = `uptime`.split(' ')[-3] | |
user = `whoami`.sub("\n", '') | |
# Optionally, use the following line to customize your username | |
# user = "@YOUR-TWITTER-NAME" | |
`curl http://loadaverages.elliottkember.com/statistics -s -d statistic\\[computer_id\\]=#{user}\\&statistic\\[uptime\\]=#{uptime}` |