add an alias to .zshrc
alias dendron-nightly="cd $HOME/dendron-repo; git add .; git commit -m '$(date +%Y.%m.%d) backup'; git push origin master"
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Sine Wave</title> | |
<script type="text/javascript"> | |
function showAxes(ctx,axes) { | |
var width = ctx.canvas.width; | |
var height = ctx.canvas.height; | |
var xMin = 0; |
#!/bin/bash | |
# seed-storage | |
# ============ | |
# Seed an existing firebase cloud storage emulator instance. Run it inside your | |
# project's firebase folder, ie: ./seed-storage.sh <project-name> <dest-folder> | |
name=firebase_export # firebase export dir name | |
project=$1 # project name | |
root=$2 # export root path |
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)function snipeAlert(pokemon,iv) { | |
pokemon = pokemon || 'Dragonite'; | |
iv = iv || 100; | |
var html = angular.element('.table-condensed').html(); | |
var re = new RegExp(`${pokemon}<\/strong>\\n*\\s*\\t*<strong class="iv ng-binding">[${iv}]+<\/strong>`,'gi'); | |
if(html.match(re)) { | |
window.alert(`Catch that ${iv}, ${pokemon}!!`); | |
} | |
} |
$('#container').highcharts({ | |
chart: { | |
alignTicks: true, // When using multiple axis, the ticks of two or more opposite axes will automatically be aligned by adding ticks to the axis or axes with the least ticks. | |
animation: true, // Set the overall animation for all chart updating. Animation can be disabled throughout the chart by setting it to false here. | |
backgroundColor: '#FFF', // The background color or gradient for the outer chart area. | |
borderColor: '#4572A7', // The color of the outer chart border. | |
borderRadius: 5, // The corner radius of the outer chart border. In export, the radius defaults to 0. Defaults to 5. | |
borderWidth: 0, // The pixel width of the outer chart border. | |
className: null, // A CSS class name to apply to the charts container div, allowing unique CSS styling for each chart. | |
defaultSeriesType: 'line', // Alias of type. |
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc
#!/bin/sh | |
# Kyle's Hook | |
###################################################################### | |
# JSHint: Run JS formatting before committing | |
###################################################################### | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
echo "no Files" | |
fi |
#!/bin/sh | |
# | |
# Pre-commit hooks | |
###################################################################### | |
# Environment Setup | |
# 1) Change directory to build dir so we can run grunt tasks. | |
# 2) Make sure path is extended to include grunt task executable | |
# dir, as this commit shell is executed in the git | |
# client's own shell; ie Tower and WebStorm have own shell path. |
#!/bin/sh | |
files=$(git diff --cached --name-only --diff-filter=ACM | grep ".js$") | |
if [ "$files" = "" ]; then | |
exit 0 | |
fi | |
pass=true | |
echo "\nValidating JavaScript:\n" |