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
export CLICOLOR=1 | |
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd | |
export PS1="\[\e[34m\]\u\[\e[m\]\[\e[35m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[36m\]\w\[\e[m\]\[\e[33m\]\\$\[\e[m\] " | |
alias dockerrm='docker rmi -f $(docker images -a -q)' | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
source $(brew --prefix)/etc/bash_completion | |
fi |
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
/* | |
Usage: | |
Adding this script to your doc: | |
- Tools > Script Manager > New | |
- Select "Blank Project", then paste this code in and save. | |
Running the script: | |
- Tools > Script Manager | |
- Select "ConvertToMarkdown" function. | |
- Click Run button. | |
- Converted doc will be mailed to you. Subject will be "[MARKDOWN_MAKER]...". |
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
#!/bin/bash | |
# Pretty Colors! | |
export CLICOLOR=1 | |
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd | |
export PS1="\[\e[34m\]\u\[\e[m\]\[\e[35m\]@\[\e[m\]\[\e[32m\]\h\[\e[m\]:\[\e[36m\]\w\[\e[m\]\[\e[33m\]\\$\[\e[m\] " | |
PATH=$HOME/apps:$PATH | |
export PATH | |
# Bash completion | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then |
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
#!/bin/bash | |
kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller | |
kubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}' | |
helm init --service-account tiller --upgrade |
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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: stupid-lb-service | |
spec: | |
type: LoadBalancer | |
selector: | |
pod-template-hash: "some-hash-number" | |
ports: | |
- protocol: TCP |
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
#!/bin/bash | |
gcloud compute --project ${GOOGLE_PROJECT} ssh --zone ${GOOGLE_ZONE} $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
import requests | |
import json | |
import urllib | |
# encode the form data | |
login_data = urllib.urlencode({ | |
'client_id': 'owasp-zap-client-id', | |
'client_secret': '....', | |
'username': '[email protected]', |
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 requests | |
import json | |
# Get an access token from Auth0 | |
def auth0_login(): | |
login_data = { | |
'client_id': '...', | |
'client_secret': '...', | |
'grant_type': 'http://auth0.com/oauth/grant-type/password-realm', |
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
#!/bin/bash | |
# Create a High Sierra ISO for CICD stuffs | |
hdiutil create -o /tmp/HighSierra.cdr -size 5200m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierra.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build | |
mv /tmp/HighSierra.cdr.dmg ~/Desktop/InstallSystem.dmg | |
hdiutil detach /Volumes/Install\ macOS\ High\ Sierra | |
hdiutil convert ~/Desktop/InstallSystem.dmg -format UDTO -o ~/Desktop/HighSierra.iso |
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
/** | |
vgs_iot_demo.ino | |
[email protected] | |
Created on: 09.12.2015 | |
Protect and Securely operate on sentive 'sensor network' data | |
Works on an ESP8266 and ESP32-WROOM | |
*/ | |
//Depending on if you use ESp8266 or ESP32 modules | |
//Change the library names |