Skip to content

Instantly share code, notes, and snippets.

@g8d3
g8d3 / id_rsa.pub
Created January 10, 2017 03:41
my public key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCeOkbLTXS9XJ+yoS0ghwHw3n6NvHs+n4gPcY0B/xnMCcszbxoE+5w4O9InnNFclAAxUZeHA2E3fa14i7XnR1DWdvAUDXcQrGLxuTDuqgR47rEEOxaI/wAJmRZ05MsQtt/VI5DK+77dYNx1ebjBUPHXPFe9je3VoOBQemzLcHfUMosd9C0DmUxX+tOtS5qkALpM+j5thvUjy5Fz+Z79cxhYlWvYN3r85B0PQPaIHGbzo3TYxCrvHLYQ2Y1FDtFS2jw4wyod528lhnBBvQ4ko4BRVz08geOxjNZlGAqu0YAigMbFpsssb17jRBVK0wVbqZaD7xnapemrIFDFHuGKdHbb pills@pills-desktop
@g8d3
g8d3 / sdf
Created January 5, 2017 16:23
wer
sdf
@g8d3
g8d3 / a.html
Last active January 5, 2017 16:22
qwe
navigator.serviceWorker.register('https://gist.githubusercontent.com/juanpastas/136c1b6381ac8f874c7084bf402b957c/raw/be873a06c05d00a17efb2b517e95d7341559e862/a.js');
Notification.requestPermission(function(result) {
if (result === 'granted') {
navigator.serviceWorker.ready.then(function(registration) {
registration.showNotification('Notification with ServiceWorker');
});
}
});

Problem:

  1. User loads page
  2. Precompiled JS and CSS are included
  3. CSS references wrong font URL

Solution:

  1. User loads page
  2. Precompiled JS and CSS are included
@g8d3
g8d3 / gist:7a91ab637a89d71c8a6290db594faddf
Created November 14, 2016 21:18
docco watch with livereload
ls prowriting.rb.md | entr docco prowriting.rb.md
livereloadx -s -p 3333
@g8d3
g8d3 / test.md
Created June 4, 2016 21:00
Test gist.io

Header 2

Some text.

@documents_by_category = Document.all.group_by{|doc| doc.category.name}
@g8d3
g8d3 / check by regexp
Last active December 30, 2015 06:52
some scripts for facebook auto poster from code canyon
$(':checkbox').map(function(i,e){if($(e).parent().text().match(/money|internet|opportu|marketing/i)) $(e).attr('checked', true);})
@g8d3
g8d3 / part 1
Created October 26, 2015 21:52
carrierwave duplicated folder
2015-10-26T21:40:17.116046+00:00 app[web.1]: [Rollbar] Error processing the payload: Encoding::UndefinedConversionError, "\xB5" from ASCII-8BIT to UTF-8. Payload: {"access_token"=>"97d7f0ef63e84359a5bfd26539fbf40e", "data"=>{:timestamp=>1445895616, :environment=>"production", :level=>"error", :language=>"ruby", :framework=>"Rails: 4.2.2", :server=>{:host=>"1634e801-3a2b-4e18-9227-0e91251517a0", :root=>"/app", :pid=>3}, :notifier=>{:name=>"rollbar-gem", :version=>"1.5.3"}, :body=>{:trace_chain=>[{:frames=>[{:filename=>"bin/rails", :lineno=>8, :method=>"<main>"}, {:filename=>"bin/rails", :lineno=>8, :method=>"require"}, {:filename=>"/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.2/lib/rails/commands.rb", :lineno=>17, :method=>"<top (required)>"}, {:filename=>"/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb", :lineno=>39, :method=>"run_command!"}, {:filename=>"/app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.2/lib/rails/commands/commands_tasks.rb", :lineno=>75, :method=>"se
@g8d3
g8d3 / -
Created August 20, 2015 04:37
notif problem
g log 56fa9d7efc62f5afaaf812f54448710847c915a8~..b766aa2d084d8ec3ae501fafc4b08e01d3139905 -p --grep noti