This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q- quitSPC w /- split window verticallySPC w- - split window horizontallySPC 1- switch to window 1SPC 2- switch to window 2SPC w c- delete current window
| #!/bin/bash | |
| # Never heard of Tridctyl? Check this out https://addons.mozilla.org/en-US/firefox/addon/tridactyl-vim/ | |
| # This script can apply Tridactyl configuration in seconds: | |
| # Step 1: Modify key bindings and string value in the variable "data" as json format. | |
| # Step 2: ./update-tridactyl-conf.sh <path/storage-sync-v2.sqlite> | |
| if [[ -z $(command -v sqlite3) ]]; then | |
| echo "Command \"sqlite3\" does not exist!" | |
| echo "Downlad: https://sqlite.org/download.html" | |
| exit 1 |
| # will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904 | |
| function jwt-decode() { | |
| sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq | |
| } | |
| JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ | |
| jwt-decode $JWT |
This is unmaintained, please visit Ben-PH/spacemacs-cheatsheet
SPC q q - quitSPC w / - split window verticallySPC w - - split window horizontallySPC 1 - switch to window 1SPC 2 - switch to window 2SPC w c - delete current window| user www-data; | |
| worker_processes 1; | |
| daemon off; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| upstream docker-registry { |
| <?php | |
| $client_id = '<insert your spotify app client id>'; | |
| $client_secret = '<insert your spotify app client secret>'; | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, 'https://accounts.spotify.com/api/token' ); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 ); | |
| curl_setopt($ch, CURLOPT_POST, 1 ); | |
| curl_setopt($ch, CURLOPT_POSTFIELDS, 'grant_type=client_credentials' ); |
| ## | |
| # WHOIS servers for new TLDs (http://www.iana.org/domains/root/db) | |
| # Current as of 2017-12-10 UTC | |
| ## | |
| \.aarp$ whois.nic.aarp | |
| \.abarth$ whois.afilias-srs.net | |
| \.abbott$ whois.afilias-srs.net | |
| \.abbvie$ whois.afilias-srs.net | |
| \.abc$ whois.nic.abc |
I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| # Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
| # Can retrieve cloudflare Domain id and list zone's, because, lazy | |
| # Place at: | |
| # /usr/local/bin/cf-ddns.sh |
| (function ($) { | |
| function getURL(center, zoom) { | |
| var lt = Math.round(center.lat() * 1e6), | |
| ln = Math.round(center.lng() * 1e6); | |
| return '?latE6=' + lt + '&lngE6=' + ln + '&z=' + zoom; | |
| } | |
| var m = Z.d().h, | |
| url = getURL(m.getCenter(), m.getZoom()), |
| # | |
| # Step One - Installing RVM | |
| # | |
| curl -L https://get.rvm.io | bash -s stable --ruby | |
| # Then, install ruby 1.8.7 -- you need to basically match the same version of Ruby as Dreamhost | |
| rvm install ruby-1.8.7-p334 |