This file contains 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
IP=`curl -s https://www.IPChicken.com | egrep -iEo "([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)" | head -n 1` | |
if [[ "$IP" = "10.0.0.1" ]]; | |
then | |
echo -e "IP IS THE SAME $IP" | |
else | |
echo -e "\e[31m IP IS NOW $IP WHICH IS DIFFERENT \e[0m" | |
fi |
This file contains 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
#!/bin/bash | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" | |
exit 1 | |
fi | |
NEWLOCATION="OldDesktop_`date +%Y-%m-%d-%s`" | |
mkdir ~/Dropbox/Desktop |
This file contains 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 * as React from 'react'; | |
import * as ReactDOM from 'react-dom'; | |
import * as PropTypes from 'prop-types'; | |
const styleObj = PropTypes.shape({ | |
color: PropTypes.string, | |
fontSize: PropTypes.number | |
}); | |
interface ButtonProps { |
This file contains 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
# implementation of RFC 4648 using extended hex alphabet | |
# https://tools.ietf.org/html/rfc4648#page-10 | |
# Used by golang in a number of places but doesn't seem to | |
# exist in the standard library. | |
encodeHex = "0123456789ABCDEFGHIJKLMNOPQRSTUV" | |
decodeHexMap = {} | |
for index, i in enumerate(encodeHex): | |
decodeHexMap[i] = index |
This file contains 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
//my config file | |
var padding = 4; | |
var pushRight = slate.operation("push", { | |
"direction" : "right", | |
"style" : "bar-resize:screenSizeX/2" | |
}); | |
var pushLeft = slate.operation("push", { |
This file contains 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
/* | |
Copyright [2014] [Graham Abbott <graham.abbott@gmail.com>] | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains 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
// This is likely to break, because I'm sure a gmail update will change some of the tags, | |
// but it's helpful if people have special css classes on their emails. | |
function removeChildStyles(dom_element) { | |
dom_element.style = null; | |
for(var index=0; index < dom_element.children.length; index++) { | |
removeChildStyles(dom_element.children[index]); | |
} | |
} |
This file contains 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 ga_code_search() { | |
# alias todo='ga_code_search "TODO\(`whoami`\)"' | |
SCREEN_WIDTH=`stty size | awk '{print $2}'` | |
SCREEN_WIDTH=$((SCREEN_WIDTH-4)) | |
# Given a spooky name so you can alias to whatever you want. | |
# (cs for codesearch) | |
# AG is WAY faster but requires a binary | |
# (try brew install the_silver_searcher) |
This file contains 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 ga_code_search() { | |
# alias todo='ga_code_search "TODO\(`whoami`\)"' | |
SCREEN_WIDTH=`stty size | awk '{print $2}'` | |
SCREEN_WIDTH=$((SCREEN_WIDTH-4)) | |
# Given a spooky name so you can alias to whatever you want. | |
# (cs for codesearch) | |
# AG is WAY faster but requires a binary | |
# (try brew install the_silver_searcher) |
This file contains 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
{ | |
"version":"2.0", | |
"metadata":{ | |
"apiVersion":"2015-03-31", | |
"endpointPrefix":"apigateway", | |
"serviceFullName":"API Gateway", | |
"signatureVersion":"v4", | |
"protocol":"rest-json" | |
}, | |
"documentation":"", |
NewerOlder