Skip to content

Instantly share code, notes, and snippets.

@GuyHarwood
GuyHarwood / docker-cheat-sheet.md
Last active February 28, 2018 17:04
Common Docker Commands

Attach to a running container

where container ID is 07a2f64399Af

docker exec -i -t 07a2 /bin/sh

Build image from Dockerfile

docker build -t imageName .

@GuyHarwood
GuyHarwood / linux_fun.md
Created October 10, 2017 08:22 — forked from marianposaceanu/linux_fun.md
How to have some fun using the terminal.

Linux fun-o-matic

How to have some fun using the terminal.

  1. Install cowsay [0] via : sudo apt-get install cowsay
  2. Install fortune [1] via : sudo apt-get install fortune
  3. Make sure you have Ruby installed via : ruby -v
  4. Install the lolcat [2] via : gem gem install lolcat
  5. Profit!
@GuyHarwood
GuyHarwood / function.json
Created September 29, 2017 15:50 — forked from tmakin/ExportPdf.cs
Create PDF Rendering service in Azure Functions
{
"bindings": [
{
"authLevel": "function",
"name": "req",
"type": "httpTrigger",
"direction": "in"
},
{
"name": "$return",
@GuyHarwood
GuyHarwood / VsCode_Shortcuts_Mac.md
Last active August 4, 2017 08:39
Everyday shortcuts in VsCode

CTRL + ~ - toggle terminal

Alt + Shift + F - Format Code

Shift + Alt + U - upload settings (Settings Sync extension)

Shift + Alt + D - download settings (Settings Sync extension)

@GuyHarwood
GuyHarwood / mongoConnect.sh
Created February 22, 2017 16:22
Connect to Mongo DB that is using Self Signed Certificate
mongo --ssl --sslAllowInvalidHostnames --sslAllowInvalidCertificates --authenticationDatabase admin --username admin --password <password>
@GuyHarwood
GuyHarwood / SetStorageCorsOptions.sh
Last active February 22, 2017 16:03 — forked from stuartleeks/SetStorageCorsOptions
Command to set CORS policy for a storage account using Azure xplat CLI.
azure storage cors set -a <storageAccount> -k <accountKey> --blob --cors '[{"AllowedMethods":["GET","OPTIONS"],"AllowedOrigins":["*"],"AllowedHeaders":["Accept","Accept-Encoding","Accept-Language","Access-Control-Request-Headers","Access-Control-Request-Method","Cache-Control","Connection","Content-Type","DNT","Host","Origin","Pragma","Referer","User-Agent","x-ms-blob-content-type","x-ms-blob-type"],"ExposedHeaders":[],"MaxAgeInSeconds":60}]'
@GuyHarwood
GuyHarwood / .bash_profile
Last active March 10, 2017 08:00
Current Bash Profile
git_branch='`git rev-parse --abbrev-ref HEAD 2> /dev/null | sed s/^/\ \|\ /`'
#emojis=(๐Ÿธ ๐Ÿจ ๐Ÿป ๐Ÿฎ ๐Ÿต ๐Ÿผ ๐Ÿง ๐Ÿ ๐Ÿข ๐Ÿ™ ๐Ÿ  ๐Ÿณ ๐Ÿฌ ๐Ÿฅ )
#emoji='`echo ${emojis[$RANDOM % 22]}`'
#PS1="\[$(tput bold)\]\[\033[38;5;39m\]\w\[$(tput sgr0)\] (\W$git_branch) ๐Ÿ‘ ๐Ÿ’จ > \[\e[0m\]"
export PS1="\[$(tput bold)\]\[\033[38;5;39m\]\w\[$(tput sgr0)\] (\W$git_branch)> \[\e[0m\]"
#PS1="\[$(tput bold)\]\[\033[38;5;39m\]\w\[$(tput sgr0)\] (\W$git_branch) ๐Ÿ‘ ๐Ÿ’จ >"
alias ls='ls -GFhla'
#load nvm
@GuyHarwood
GuyHarwood / Bash Prompt with Git and Emoji
Created February 9, 2017 10:30 — forked from jstuckey/Bash Prompt with Git and Emoji
Bash Prompt with Git and Emoji - Add to ~/.bash_profile
git_branch='`git rev-parse --abbrev-ref HEAD 2> /dev/null | sed s/^/\ \|\ /`'
emojis=(๐Ÿถ ๐Ÿบ ๐Ÿฑ ๐Ÿญ ๐Ÿน ๐Ÿฐ ๐Ÿธ ๐Ÿฏ ๐Ÿจ ๐Ÿป ๐Ÿท ๐Ÿฎ ๐Ÿต ๐Ÿผ ๐Ÿง ๐Ÿ ๐Ÿข ๐Ÿ™ ๐Ÿ  ๐Ÿณ ๐Ÿฌ ๐Ÿฅ)
emoji='`echo ${emojis[$RANDOM % 22]}`'
PS1="\[\033[0;36m\]\T | \W$git_branch | $emoji > \[\e[0m\]"
@GuyHarwood
GuyHarwood / 00.howto_install_phantomjs.md
Created February 8, 2017 17:24 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev