Skip to content

Instantly share code, notes, and snippets.

@chrislloyd
chrislloyd / readme.md
Last active August 29, 2015 13:56
Flat tab bar for Atom

Use this css to disable the ugly skew-tabs that Atom ships with:

preview

Keybase proof

I hereby claim:

  • I am chrislloyd on github.
  • I am chrislloyd (https://keybase.io/chrislloyd) on keybase.
  • I have a public key whose fingerprint is F429 4503 004C A9DF 1206 6DEE 53CE DF0A 6BDC 0B31

To claim this, I am signing this object:

@chrislloyd
chrislloyd / nonoptimistic.js
Created February 19, 2015 16:37
up vote widget
// in this version, the user clicks the button, the request is sent to the server and the number of upvotes
// is only updated when the response comes back
handleClick: function(e) {
e.preventDefault();
this.upvote();
},
upvote: function() {
// Not sure what the state name is here, just need this to toggle the button immediately
@chrislloyd
chrislloyd / whitespace.rb
Created May 5, 2015 02:00
BASS Responsive whitespace helpers
# ruby whitespace.rb | pbcopy
%w(sm md lg).each do |breakpoint|
puts "@media (--breakpoint-#{breakpoint}) {"
{
0 => ['0', '0'],
1 => ['var(--space-1)', 'calc(0 - var(--space-1))'],
2 => ['var(--space-2)', 'calc(0 - var(--space-2))'],
3 => ['var(--space-3)', 'calc(0 - var(--space-3))'],
/*
This file was autogenerated from Meta's CSS. I tried getting
postcss-for working but it turns out it's a massive PITA. /shrug
~ @chrislloyd
*/
@media (--breakpoint-sm) {
.sm-m0 { margin: 0 }
.sm-mt0 { margin-top: 0 }
.sm-mr0 { margin-right: 0 }
function cssmodularize(strings) {
/* TODO: Un-stub */
return {
'.foo': 'Button-foo-abcd'
}
}
class Button {
static styles = cssmodularize`
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvCdDiS/B2rfALAM/GHYn8fxjxOWDhJYdLbTtFFTrSJYLaR/56nZ6ptNL8GEAdFgoPKVAYc022jAE7bd/bHHo3EfVzHMq3rDjPrPNKwlChkqS8JkanQFurjptGsrF01wyvhxIsyVGT0u8iKk3hGfVqZxI19Bq4UKdYSmGtAqhCLmO3KXT1uOtb/v92N7x2AInDDVBN0wX56Xne33/wagAYVxcvYYnDxpQbPDB5e2yXXcU5P6AISnoI86eFX9hoHcP85plk4vcXKS1JUyebgT3aTW8EdhIKaDh+tm68v+yqi4GThM/UgT7/0rj8kwaJoEYzmMnI09XGO/H7mC2O9gqkQ== Chris@Fuji.local
~/Projects/roro-faces pretty$ sc
Loading development environment (Rails 2.1.1)
/Library/Ruby/Site/1.8/rubygems.rb:142:in `activate':Gem::Exception: can't activate hpricot (= 0.6, runtime), already activated hpricot-0.6.161
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- html/document (MissingSourceFile)
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:355:in `new_constants_in'
from /Library/Ruby/Gems/1.8/gems/activesupport-2.1.1/lib/active_support/dependencies.rb:510:in `require'
from /Library/Ruby/Gems/1.8/gems/actionpack-2.1.1/lib/action_controller/assertions/response_assertions.rb:2
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
#!/usr/bin/ruby
# Just splits up the queries into 20 tracks at a time, so I don't inundate the service, and so I can see what's happening.
# Its pretty slow on average.
# I'll need to parse the XML and reapply to the tags.
#
# get a MusicDNS key + genpuid & friends at http://www.musicip.com/
require 'rubygems'
require 'escape' # gem install escape
alias l='ls -GlAF'
alias h='history'
alias d='cd $HOME/Desktop'
alias c='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias rbash='source ~/.bash_profile'
alias ebash='$EDITOR ~/.bashrc; rbash'