- Tell me about yourself.
- Tell me about the most boring job you have ever had.
- What changes would you make if you came on board?
- What would you say to your boss if he is crazy about an idea, but you think it stinks?
- Assuming that you are selected, what will be your strategy for next 60 days?
- why are not you earning more money at this stage of your career?
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
#import "AppDelegate.h" | |
#import "LMURLImageProtocol.h" | |
@implementation AppDelegate | |
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
[NSURLProtocol registerClass:[LMURLImageProtocol class]]; | |
// etc |
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
browser.takeScreenshot().then(function (png) { | |
var fs = require('fs'), | |
buf = new Buffer(png, 'base64'), | |
stream = fs.createWriteStream('exception.png'); | |
stream.write(buf); | |
stream.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
/* | |
## Simple PubSub with Javascript | |
### Usage: | |
var client = pubsub.subscribe('myChannel', function(data){ | |
console.log(data); | |
}); |
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
// a simple function to execute a callback, | |
// after the user has stopped typing for a specified amount of time | |
var typewatch = (function(){ | |
var timer = 0; | |
return function(callback, ms){ | |
clearTimeout (timer); | |
timer = setTimeout(callback, ms); | |
}; | |
})(); |
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
$.fn.closest_descendent = function(filter) { | |
var $found = $(), | |
$currentSet = this; // Current place | |
while ($currentSet.length) { | |
$found = $currentSet.filter(filter); | |
if ($found.length) break; // At least one match: break loop | |
// Get all children of the current set | |
$currentSet = $currentSet.children(); | |
} | |
return $found.first(); // Return first match of the collection |
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
# environments/{development.rb || test.rb} | |
# Left blank to skip s3 in development. | |
PAPERCLIP_STORAGE_OPTIONS = {} |
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
def valid_msp_number(msp_number) | |
weights = [0, 2, 4, 8, 5, 10, 9, 7, 3, 0] | |
total = 0 | |
weights.to_enum.with_index(1).each do |weight, i| | |
total = total + msp_number[i-1].to_i * weight.to_i | |
end | |
a = total / 11 | |
b = a * 11 | |
c = total - b | |
result = 11 - c |
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
Show hidden characters
{ | |
"cmd": ["/usr/local/bin/rbenv", "exec", "ruby", "$file"], | |
"selector": "source.ruby" | |
} |
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
alternatively: | |
script/console --irb=pry |