#The power of z
Do you spend lots of time doing things like this?
cd this/is/the/path/that/i/want/so/i/type/it/all/out/to/get/whereiwant
With z, you could just do this:
/// Import on the top of your project | |
import "github.com/ethereum/go-ethereum/crypto" | |
type ethHandlerResult struct { | |
Result string `json:"result"` | |
Error struct { | |
Code int64 `json:"code"` | |
Message string `json:"message"` | |
} `json:"error"` | |
} |
#!/bin/sh | |
EMULATOR="cloud-firestore-emulator" | |
EMULATOR_TARGET=$(find ~/.cache/firebase/emulators/ -type f -name "$EMULATOR*.jar" | sort -r | head -n1) | |
if [ -z "$EMULATOR_TARGET" ]; then | |
echo "Could not find the firestore emulator. Ending test run." | |
exit 1 | |
fi |
# best practice: linux | |
nano ~/.pgpass | |
*:5432:*:username:password | |
chmod 0600 ~/.pgpass | |
# best practice: windows | |
edit %APPDATA%\postgresql\pgpass.conf | |
*:5432:*:username:password | |
# linux |
(function ($) { | |
'use strict'; | |
function recordTimeToFirstPaint() { | |
// Use Chrome's loadTimes or IE 9+'s msFirstPaint to record the time to render in milliseconds: | |
var firstPaintTime, timingSource; | |
if ('chrome' in window && $.isFunction(window.chrome.loadTimes)) { | |
var loadTimes = window.chrome.loadTimes(); |
#!/bin/sh | |
# PATH TO YOUR HOSTS FILE | |
ETC_HOSTS=/etc/hosts | |
# DEFAULT IP FOR HOSTNAME | |
IP="127.0.0.1" | |
# Hostname to add/remove. | |
HOSTNAME=$1 |
var express = require('express'); | |
var cookieParser = require('cookie-parser'); | |
var session = require('express-session'); | |
var flash = require('express-flash'); | |
var handlebars = require('express-handlebars') | |
var app = express(); | |
var sessionStore = new session.MemoryStore; | |
// View Engines |
#The power of z
Do you spend lots of time doing things like this?
cd this/is/the/path/that/i/want/so/i/type/it/all/out/to/get/whereiwant
With z, you could just do this:
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
#!/bin/bash | |
hostname=$(hostname) | |
# Run top twice, first output is cached | |
top_out=$(top -bn2 -d0.1) | |
cpu=$(echo "${top_out}" | grep "Cpu(s)" | sed -E "s/.*,\s*([0-9\.]+)\%id.*/\1/" | awk '{print 100 - $1}' | sed -n 2p) | |
memory_total=$(echo "${top_out}" | grep "Mem:" | awk {'print $2'} | sed s/k// | sed -n 2p) |