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 json | |
# Get auth0 access token for API | |
def getAccessToken(connUrl, api_id, client_id, client_secret): | |
conn = http.client.HTTPSConnection("foobar.auth0.com") | |
payload = f'''{{"grant_type": "client_credentials", | |
"client_id": "{client_id}", | |
"client_secret": "{client_secret}", | |
"audience": "{api_id}"}} | |
''' |
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 psycopg2 | |
import psycopg2.extras | |
end_point="foobar.baaz.us-west-2.rds.amazonaws.com" | |
dbname="exampledb" | |
username="someuser" | |
password="somepassword" | |
def getDbConn(): |
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
def random_string(n): | |
return ''.join(random.choice(string.ascii_uppercase + string.digits) for _ in range(n)) | |
#random_string(10) |
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
<div style="background-color:red;height:200px;display:flex;flex-direction: column;align-items:center;justify-content:center"> | |
<div> | |
Foo | |
</div> | |
<div> | |
BarJar | |
</div> | |
</div> |
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 | |
# Setup devlopment environment | |
tmux new-session -s dev -n servers -d | |
tmux new-session -s notebook -d | |
tmux new-session -s webdriver -d | |
tmux send-keys -t dev 'cd ~/e/evvemi-new-backend-development' C-m | |
tmux split-window -h -t dev | |
tmux split-window -v -t dev |
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
set -g base-index 1 | |
# remap prefix to Control + a | |
set -g prefix C-a | |
# bind 'C-a C-a' to type 'C-a' | |
bind C-a send-prefix | |
unbind C-b | |
# Window spliiting commands |
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
927ce59... 05/22/18 15:44 public Hammerspoon configuration | |
474b0be... 05/19/18 17:19 public Tikz text along circle | |
b808c01... 05/19/18 16:44 public Tikz box alignment | |
2ed760c... 05/19/18 14:08 public Minimal Tikz document | |
bf1f666... 05/19/18 14:03 public Tikz block diagram | |
10894297 04/16/14 08:29 public What is this? | |
9182004 02/23/14 20:33 public | |
8695437 01/29/14 11:43 public | |
8681911 01/28/14 20:36 public | |
8655216 01/27/14 11:01 public |
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
-- | |
--------------------------------------- | |
-- Hotkeys to launch and focus to apps | |
-- Hotkey to toggle fullscreen mode | |
-- Hotkey to toggle Hammerspoon console | |
--------------------------------------- | |
-- | |
local log = hs.logger.new('mymodule','debug') | |
local hyper = {"ctrl", "alt", "cmd"} |
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
\documentclass{standalone} | |
\usepackage{tikz} | |
\usetikzlibrary{shapes.misc, positioning, backgrounds, fit} | |
\usetikzlibrary{decorations.text} | |
\begin{document} | |
\begin{tikzpicture}[node distance=1 and 1] | |
\draw (0,0) circle (3cm); | |
\draw (0,0) [decorate, decoration={text along path, |
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
\documentclass{standalone} | |
\usepackage{tikz} | |
\usetikzlibrary{shapes.misc, positioning, backgrounds, fit} | |
\begin{document} | |
\begin{tikzpicture}[node distance=1 and 1] | |
\draw[help lines, very thin] (-1,-3) grid (5, 1); | |
% Drawing boxes left aligned | |
\node at (0,0) [rectangle,white,fill=red] (D) {D}; |