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
localhost ansible_connection=local |
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
const moment = require('moment') | |
const HOURS = { | |
WORK_START: 8, | |
LUNCH_START: 12, | |
LUNCH_END: 13, | |
WORK_END: 17 | |
} | |
const INT_LUNCH_DURATION = (HOURS.LUNCH_END - HOURS.LUNCH_START) |
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
firstLine=`head -2 $1 | tail -1` | |
if [[ $firstLine == \#* ]]; then # Testing that the file starts with a comment, not yet a real commit ;) | |
echo '<type>(<component>): <subject>' > .prepare-commit-msg-temp | |
echo '' >> .prepare-commit-msg-temp | |
echo '<body>' >> .prepare-commit-msg-temp | |
echo '' >> .prepare-commit-msg-temp | |
echo '# types: feat, fix, docs, style, refactor, test, chore(mantean)' >> .prepare-commit-msg-temp | |
{ cat .prepare-commit-msg-temp; cat $1; } > .prepare-commit-msg-temp2 | |
cat .prepare-commit-msg-temp2 > $1 |
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
(function() { | |
jsf.ajax.addOnEvent(function(data) { | |
if (data.status == "success") { | |
var viewState = getViewState(data.responseXML); | |
for (var i = 0; i < document.forms.length; i++) { | |
var form = document.forms[i]; | |
if (form.method == "post" && !hasViewState(form)) { | |
createViewState(form, viewState); |
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
SELECT * | |
FROM TABLENAME | |
WHERE DateTime BETWEEN '04/12/2011 12:00:00 AM' AND '05/25/2011 3:53:04 AM' |
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
docker-machine create -d virtualbox --engine-opt tlsverify=false node1 | |
eval $(docker-machine env node1) | |
unset DOCKER_TLS_VERIFY |
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
function vpn-connect { | |
/usr/bin/env osascript <<-EOF | |
tell application "System Events" | |
tell current location of network preferences | |
set VPN to service "your-vpn-name" | |
if exists VPN then connect VPN | |
repeat while (current configuration of VPN is not connected) | |
delay 1 |
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
# put it on your .bash_profile or .zshrc | |
dck_status=$(docker-machine status) | |
if [ $dck_status == "Stopped" ]; then | |
echo "sdck ~ starting docker-machine..." | |
docker-machine start | |
echo "sdck ~ setting environment.." | |
eval $(docker-machine env) | |
else |
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 <stdbool.h> | |
#import <string.h> | |
#import <stdlib.h> | |
#import <stdio.h> | |
bool is_valid(char serial[]); | |
void print(char serial[]); | |
int digit_to_int(char digit); | |
bool is_int_value(char digit); | |
int valid_serial(); |
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
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# |