Skip to content

Instantly share code, notes, and snippets.

View jookyboi's full-sized avatar

Rui Jiang jookyboi

View GitHub Profile
What’s stopping your web pages from getting silky smooth scrolling, buttery animation and a user experience that’s snappy and fast? Jank-free rendering performance has been shown to positively affect user engagement and experience in many large sites, but remains an area many are unaware of how to diagnose or optimize.
To highlight how widespread rendering is a performance bottleneck, I’ve been giving a few talks walking through a detailed case study of the Pinterest.com feed. A recording of the most recent one is now up where you might learn about common paint issues in modern sites and equally as importantly — how to diagnose them.
By the end of the recording you’ll be equipped with the knowledge to use a number of performance diagnosis features in Chrome DevTools to find and fix rendering issues in your own sites.
@jookyboi
jookyboi / delete_branch.sh
Last active September 21, 2017 19:15
Delete a Git branch remotely.
g push origin --delete [branch_name]
env RUBYLIB=/Applications/RubyMine.app/rb/testing/patch/common:/Applications/RubyMine.app/rb/testing/patch/bdd zeus start
describe('User', function(){
describe('#save()', function(){
it('should save without error', function(done){
var user = new User('Luna');
user.save(function(err){
if (err) throw err;
done();
});
})
})
@jookyboi
jookyboi / grunt.sh
Created October 4, 2013 14:58
Using Grunt to build. From http://gruntjs.com/
grunt
Running "jshint:gruntfile" (jshint) task
>> 1 file lint free.
Running "jshint:src" (jshint) task
>> 1 file lint free.
Running "jshint:test" (jshint) task
>> 1 file lint free.
def self.all_cached
Rails.cache.fetch('Contact.all') { all }
end
agent = WWW::Mechanize.new
agent.get("http://www.awesomeblog.com/amazing-article")
scraper.text = MyScraper.new(:text => Pismo::Document.new(agent.url))
while agent.page.link_with("rel='next'").click do
pismo_doc = Pismo::Document.new(agent.url)
scraper.text << pismo_doc.lede
end
<input type="text" onpaste="return false;" />
var oldDate = Date;
Date = function (fake)
{
return new oldDate('03/08/1980');
}
var x = new Date();
window.alert(x);