This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##----GIT------ | |
alias gs='clear ;and git status' | |
alias gb='git branch' | |
alias gbranch='git rev-parse --abbrev-ref HEAD' #get current branch name | |
alias gl="clear ;and git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
alias gt='git tag' | |
alias grm='git rm' | |
alias gps='git push' | |
alias gbi='git bisect' | |
alias gbg='git bisect good' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Import an Angular template. | |
* Returns the HTML as a string | |
* Could be chained with a separate loader if you want to populate Angular's template cache | |
*/ | |
module.exports = function(source) { | |
var html = "'" + source.replace(/"/g, '\\\"').replace(/\n/g, '\\') + "'"; | |
return "module.exports = \"" + html + "\""; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
atom-text-editor::shadow { | |
.line-numbers{ | |
padding-left: 4px !important; | |
} | |
.git-line-modified, .git-line-added{ | |
margin-left: -4px; | |
padding-left: 2px !important; | |
opacity: .5 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Feedback from real use: | |
* 1. Need to be able to transform the entire request before it even arrives to the model, | |
* not just transform each item (but want that too) | |
* 2. Declaring which fields you want is kinda lame, I wasted time trying to track down | |
* why the "children" field wasn't showing up. | |
* 3. Caching most definitely needs to be optional | |
* 4. transformOut CAN'T modify the original object right? Or the UI will hork? It's safe when using toJSON and fromJSON since those make new objects I think. Will need to add a test for this. | |
* 5. model.json() and model.rest() APIs seem wonky, should just be combined. Can still make cache separete or make it an option. | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component(nav){ | |
part (item){ | |
option(selected){ | |
background: blue; | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use joyent's configuration for docker in the cloud. | |
# This makes it easy to toggle between using joyent and using local docker. | |
# Use your joyent username on line 8 | |
# Use your joyent host if different | |
function jdocker | |
set -e DOCKER_TLS_VERIFY | |
set -gx DOCKER_CERT_PATH ~/.sdc/docker/<YOUR JOYENT USERNAME> | |
set -gx DOCKER_HOST "tcp://us-east-3b.docker.joyent.com:2376" | |
docker --tls $argv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-webkit-keyframes rotate { from { -webkit-transform: rotate(0deg); -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); } | |
to { -webkit-transform: rotate(360deg); -moz-transform: rotate(360deg); -ms-transform: rotate(360deg); transform: rotate(360deg); } } | |
*, html, body { -webkit-font-smoothing: antialiased; } | |
a { color: #39464e; text-decoration: none; } | |
a:hover { text-decoration: underline; } | |
input, textarea, select { font-family: "Open Sans", "Helvetica", "Arial", "FreeSans", "Verdana", "Tahoma", "Lucida Sans", "Lucida Sans Unicode", "Luxi Sans", sans-serif; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Abstraction around multichoice questions that works in windows, despite https://github.com/nodejs/node/issues/5384 | |
* Uses arrow keys for non-windows and number selection for windows | |
*/ | |
var inquirer = require("inquirer"); | |
var isWindows = /^win/.test(process.platform); | |
module.exports = function(questions) { | |
if (!isWindows) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Angular 1.x components don't let you do a "replace:true", so they're always nested in another HTML tag. | |
// This nesting makes it so you can't use some really useful css pseudo-classes like ":last-of-type". | |
// This workaround puts a CSS class on the actual root, so you can take adavantage of these CSS goodies. | |
export default class Task { | |
constructor($element){ | |
// add class to component root element for easier css styling | |
// using aphrodite | |
$element.addClass(css(styles.container)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* A sample Angular 1 component, created using the component helper above. | |
* Uses Aphrodite for CSS | |
*/ | |
import component from './component'; | |
import { StyleSheet, css } from 'aphrodite'; | |
const styles = StyleSheet.create({ | |
avatar: { |