Skip to content

Instantly share code, notes, and snippets.

View jonchretien's full-sized avatar
📷

Jon C. jonchretien

📷
View GitHub Profile
@jonchretien
jonchretien / us-states.json
Last active December 29, 2015 19:09
topojson -o output.json -e us-states.tsv -p -- us-states.json https://github.com/mbostock/topojson/wiki/Command-Line-Reference
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jonchretien
jonchretien / us-state-names.json
Created November 26, 2013 16:02
State info with ids from topo.json file.
[
{
"name": "Alabama",
"abbreviation": "AL",
"id": 1
},
{
"name": "Alaska",
"abbreviation": "AK",
"id": 2
/**
* Convert font-size from px to rem with px fallback
*
* @param $size - the value in pixel you want to convert
*
* e.g. p {@include fontSize(12px);}
*
*/
// Function for converting a px based font-size to rem.
@jonchretien
jonchretien / sublime.md
Created November 4, 2013 14:56
Useful keyboard shortcuts for Sublime Text 2.

Sublime Text 2 Cheat Sheet

  • Paste and Indent: Shift+Command+V
  • Insert Line Before: Command+Return
  • Insert Line After: Shift+Command+Return
  • Delete to Beginning: Command+Delete
  • Delete to End: Ctrl+K
  • Transpose: Ctrl+T
  • Join Lines: Command+J
  • Swap Line Up: Ctrl+Command+Up
@jonchretien
jonchretien / index.html
Last active December 26, 2015 03:29
Rough prototype using a slider control.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>slider module</title>
<style>
input[type="range"] {
width: 300px;
}
input[type="text"] {
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
}
@mixin flex($values) {
-webkit-box-flex: $values;
<!doctype html>
<html>
<head>
<title>Card Effects</title>
<meta charset="UTF-8">
<style>
* {
margin: 0;
padding: 0;
}
// Install a grunt plugin and save to devDependencies
// ex: gi nodemon
function gi() {
npm install --save-dev grunt-"$@"
}
// Install a grunt-contrib plugin and save to devDependencies
function gci() {
npm install --save-dev grunt-contrib-"$@"
}
@jonchretien
jonchretien / embed-jq.js
Created August 9, 2013 17:05
Embed jQuery in Chrome console.
if (!window.jQuery) {
var script = document.createElement('script');
script.setAttribute('src', '//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js');
document.getElementsByTagName('head')[0].appendChild(script);
}