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 debounce(func, wait, immediate) { | |
var timeout; | |
return function() { | |
var context = this, args = arguments; | |
var later = function() { | |
timeout = null; | |
if (!immediate) func.apply(context, args); | |
}; | |
var callNow = immediate && !timeout; | |
clearTimeout(timeout); |
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
workout = { | |
buddys = "<null>"; | |
completed = 1; | |
"gym_id" = "<null>"; | |
mood = "<null>"; | |
name = "Custom Workout"; | |
provider = ios; | |
"total_workout_time" = 22; | |
"via_logger" = 1; | |
"workout_date" = 1483878574; |
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
blago@Blagovest-Dachevs-MacBook-Pro iOS (master) $ wget "http://d2xqg7gw3c1myh.cloudfront.net/tcvt_v002/tcvt_v002_cell200_ipad_29.ts" | |
--2012-04-04 16:30:51-- http://d2xqg7gw3c1myh.cloudfront.net/tcvt_v002/tcvt_v002_cell200_ipad_29.ts | |
Resolving d2xqg7gw3c1myh.cloudfront.net (d2xqg7gw3c1myh.cloudfront.net)... 205.251.203.119, 205.251.203.96, 205.251.203.121, ... | |
Connecting to d2xqg7gw3c1myh.cloudfront.net (d2xqg7gw3c1myh.cloudfront.net)|205.251.203.119|:80... connected. | |
HTTP request sent, awaiting response... 200 OK | |
Length: 348368 (340K) [video/MP2T] | |
Saving to: `tcvt_v002_cell200_ipad_29.ts.1' | |
0% [ ] 0 --.-K/s in 0s |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
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
"America/Adak", | |
"America/Anchorage", | |
"America/Anguilla", | |
"America/Antigua", | |
"America/Araguaina", | |
"America/Argentina/Buenos_Aires", | |
"America/Argentina/Catamarca", | |
"America/Argentina/Cordoba", | |
"America/Argentina/Jujuy", | |
"America/Argentina/La_Rioja", |
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
class << ActiveRecord::Base | |
def each(chunk_size=100) | |
(0..self.last.id / chunk_size).each do |offset| | |
self.find(:all, :limit => chunk_size, :conditions => ['id > ?', offset * chunk_size]).each do |i| | |
yield i | |
end | |
end | |
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
/* | |
* Replace device token with your own | |
*/ | |
// News | |
{"aps": | |
{"badge":1, | |
"alert":"Breaking News", | |
"sound":"default" | |
}, |
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 m = function() { | |
var key = this.stat_module_id + '_' + this.game_id + '_' + this.team_id; | |
emit(key, 1); | |
}; | |
var r = function(k,vals) { | |
var sum = 0; | |
for (var i in vals) { | |
sum += vals[i]; | |
} |
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
lvextend -L 400G /dev/mapper/vg00-home | |
xfs_growfs /home |
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
// one | |
function palindrome(text) { | |
var longest = ''; | |
for (var i = 0; i < text.length; i++) { | |
var charOne = text.charAt(i); | |
for (var j = text.length-1; j > i; j--) { | |
var charTwo = text.charAt(j); | |
NewerOlder