Skip to content

Instantly share code, notes, and snippets.

View lzcabrera's full-sized avatar
:octocat:

Laura Cabrera lzcabrera

:octocat:
  • Victoria, BC
  • 06:16 (UTC -07:00)
View GitHub Profile
<FlexGrid limitWidth gutter={false}>
<FlexGrid.Col span={12}>
<Box horizontal={3}>
<Paragraph>{text}</Paragraph>
</Box>
</FlexGrid.Col>
<FlexGrid.Col span={columns}>
<Box horizontal={3} vertical={3}>
<Card>{text}</Card>
var size = {
width: window.innerWidth || document.body.clientWidth,
height: window.innerHeight || document.body.clientHeight
}
@lzcabrera
lzcabrera / Rakefile
Created August 10, 2015 23:50
Copy files to jekyll
require 'bundler/setup'
require 'fileutils'
def copy_compiled_css_to_docs(version)
Dir.glob('./css/dist/**/*.css').each do |file|
dir, filename = File.dirname(file).sub('./',''), File.basename(file)
dest = File.join('docs/src/v'+version+'/hydra', dir)
FileUtils.mkdir_p(dest)
FileUtils.cp(file, File.join(dest,filename))
@lzcabrera
lzcabrera / pre-push.sh
Created November 13, 2014 22:57
run dss before pushing to remote master
#!/bin/bash
BRANCH=`git rev-parse --abbrev-ref HEAD`
if [[ "$BRANCH" == "master" ]]; then
echo "Call grunt docs to update style guide"
cd build
echo $($pwd)
grunt docs
fi
@lzcabrera
lzcabrera / steps
Last active August 29, 2015 14:06
woff2 font-compression
*Download the reference codebase*
$ git clone https://code.google.com/p/font-compression-reference/
*Build the project*
cd font-compression-reference/woff2
make clean all
*Run the tool over a given font*
$ ./woff2_compress telusdings.ttf
@lzcabrera
lzcabrera / rebase-commands
Created September 18, 2014 21:45
rebase belong to us
]$ git checkout feature-branch
]$ git rebase develop
]$ git checkout develop
]$ git merge feature-branch
@lzcabrera
lzcabrera / 0_reuse_code.js
Created August 14, 2014 23:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@lzcabrera
lzcabrera / callbacks
Created August 11, 2014 04:55
callbacks inside an active record model
before_validation
after_validation
before_save
after_save
before_create
after_create
before_update
@lzcabrera
lzcabrera / gist:71dbb08d66719be1de38
Last active August 29, 2015 14:05
rake db commands
rails g migration Add[*]And[#]To[TableName] *:string #:boolean
rails g migration Remove[*]From[TableName] *:integer
rake db:migrate
rake db:rollback
rake db:schema:dump
rake db:setup
# Migration commands
add_column
@lzcabrera
lzcabrera / rbenv
Last active August 29, 2015 14:05
rbenv commands
# list all available versions:
$ rbenv install -l
# install a Ruby version:
$ rbenv install 2.0.0-p247
# set/unset local
$ rbenv local 1.9.3-p327
$ rbenv local --unset