Skip to content

Instantly share code, notes, and snippets.

View ShawnClake's full-sized avatar
💭
Coding

Shawn Clake ShawnClake

💭
Coding
  • Calian
  • Canada
View GitHub Profile
@ShawnClake
ShawnClake / markdown.md
Created October 28, 2018 16:10
Markdown Cheat sheet
@ShawnClake
ShawnClake / css_circular_profile_pictures.html
Last active October 9, 2018 21:04
CSS Circular Profile Pictures
<div style='background-image:url("https://i.ytimg.com/vi/gaLIEUNv2YM/maxresdefault.jpg");background-position:50% 50%;background-size: cover;background-repeat:no-repeat;border-radius:50%;height:250px;width:250px;'></div>
@ShawnClake
ShawnClake / github.md
Last active October 28, 2018 16:15
Github cheatsheet

Github command cheatsheet

Branching

If another_branch already exists locally and you are not on this branch, then git checkout another_branch switches to the branch.

If another_branch does not exist but origin/another_branch does, then git checkout another_branch is equivalent to git checkout -b another_branch origin/another_branch;git branch -u origin/another_branch. That's to create another_branch from origin/another_branch and set origin/another_branch as the upstream of another_branch.

If neither exists, git checkout another_branch returns error.

@ShawnClake
ShawnClake / docker.md
Last active July 6, 2021 06:50
Docker cheat sheet
@ShawnClake
ShawnClake / pypi.md
Last active June 2, 2018 17:19 — forked from gboeing/pypi.md
How to organize and distribution a package on pypi

To distribute a package on pypi

Directory structure

/project/
    /package/
        __init__.py
        module.py
    setup.py
@ShawnClake
ShawnClake / tmux.md
Last active January 14, 2018 17:59 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@ShawnClake
ShawnClake / entropy-generator.sh
Created December 20, 2017 19:47
Entropy Generator - Taken from Loye Young
## list of mounted disks/partitions, to generate more disparate disk activity
# PARTITIONS=”/home /var /srv /usr/ /var/cache”
## list of sites using round-robin DNS
#ROUND_ROBINS=”www.yahoo.com google.com twitter.com outlook.com”
## How much entrophy do you want?
#STOP_LIMIT=”4200″
#START_LIMIT=”4100″
#while [ /dev/true ]
#do until [ “$(cat /proc/sys/kernel/random/entropy_avail)” -gt “$STOP_LIMIT” ]
#do while [ “$(cat /proc/sys/kernel/random/entropy_avail)” -lt “$START_LIMIT” ]
@ShawnClake
ShawnClake / openstack-heat-template-1i.yaml
Last active November 29, 2017 14:50
OpenStack Heat Template - 1i
heat_template_version: 2017-02-24
parameters:
key_name:
type: string
description: Name of a KeyPair
flavor_name:
type: string
description: Name of a Flavor
image_name:
@ShawnClake
ShawnClake / openstack-heat-template-2i_1n.yaml
Last active November 29, 2017 14:51
OpenStack Heat Template - 2i_1n
heat_template_version: 2017-02-24
parameters:
key_name:
type: string
description: Name of a KeyPair
flavor_name:
type: string
description: Name of a Flavor
image_name:
@ShawnClake
ShawnClake / openstack-heat-template-4i_2n_2v_no-volumes.yaml
Last active November 28, 2017 16:57
OpenStack Heat Template - 4i_2n_2v_no-volumes
heat_template_version: 2017-09-01
parameters:
key_name:
type: string
description: Name of a KeyPair
flavor_name:
type: string
description: Name of a Flavor
image_name: