Skip to content

Instantly share code, notes, and snippets.

View pertrai1's full-sized avatar
🏠
Working from home

Rob Simpson pertrai1

🏠
Working from home
  • Warrenton, VA
View GitHub Profile
@pertrai1
pertrai1 / actionlist.vim
Created March 10, 2024 23:32 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
@pertrai1
pertrai1 / ohmyposhv3-v2.json
Last active October 24, 2021 02:15 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@pertrai1
pertrai1 / example01.js
Created April 25, 2018 09:02 — forked from mpj/example01.js
Code for the async/await episode of Fun Fun Function.
const response = await fetch(`https://catappapi.herokuapp.com/users/${userId}`)
const data = await response.json()
return data.imageUrl
}
@pertrai1
pertrai1 / runfile.js
Created October 19, 2016 02:20 — forked from pawelgalazka/runfile.js
Example of runfile.js (for medium article)
import { run } from 'runjs'
const task = {
'clean': () => {
run('rm -rf node_modules')
run('rm -rf build')
},
'build:clean': () => {
run('rm -rf build')
run('mkdir build')
@pertrai1
pertrai1 / package.json
Created October 19, 2016 02:19 — forked from pawelgalazka/package.json
Example of npm scripts
"scripts": {
"clean": "rimraf dist/*",
"prebuild": "npm run clean -s",
"build": "npm run build:scripts -s && npm run build:styles -s && npm run build:markup -s",
"build:scripts": "browserify -d assets/scripts/main.js -p [minifyify --compressPath . --map main.js.map --output dist/main.js.map] | hashmark -n dist/main.js -s -l 8 -m assets.json 'dist/{name}{hash}{ext}'",
"build:styles": "stylus assets/styles/main.styl -m -o dist/ && hashmark -s -l 8 -m assets.json dist/main.css 'dist/{name}{hash}{ext}'",
"build:markup": "jade assets/markup/index.jade --obj assets.json -o dist",
"test": "karma start --singleRun",
"watch": "parallelshell 'npm run watch:test -s' 'npm run watch:build -s'",
"watch:test": "karma start",
@pertrai1
pertrai1 / tmux.md
Created October 6, 2016 16:40 — 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

@pertrai1
pertrai1 / tm2iterm.rb
Created September 14, 2016 06:06 — forked from maxim/tm2iterm.rb
Convert TextMate themes into iTerm 2 color schemes.
#!/usr/bin/env ruby
#
# This script is an astonishing feat of top notch
# rockstar craftsmanship. It totally uses artificial
# intelligence to extract colors out of tmTheme and
# build an itermcolors scheme file for iTerm2.
#
# I know this sounds crazy, but it actually knows
# approximately what colors should be used in the
# ANSI list, and tries to find nearest colors from
@pertrai1
pertrai1 / quick-git-reference.md
Created May 24, 2016 06:25 — forked from vecano/quick-git-reference.md
Quick Git Reference

Quick Git Reference

Configuring

git config --global user.name "<First Last>"
git config --global user.email <johndoe@example.com>
git config --global core.editor <vim>

git config --global color.ui true

@pertrai1
pertrai1 / npm-scripts.md
Created February 20, 2016 00:46 — forked from hashrock/npm-scripts.md
awesome-npm-scripts
{
    "build-js": "browserify browser/main.js | uglifyjs -mc > static/bundle.js",
    "build-css": "cat static/pages/*.css tabs/*/*.css",
    "build": "npm run build-js && npm run build-css",
    "watch-js": "watchify browser/main.js -o static/bundle.js -dv",
    "watch-css": "catw static/pages/*.css tabs/*/*.css -o static/bundle.css -v",
    "watch": "npm run watch-js & npm run watch-css",
@pertrai1
pertrai1 / fish-zsh
Created October 26, 2015 07:23
zsh fish like autocomplete installation instructions
Clone this repository to ~/.zsh/zsh-autosuggestions (or anywhere else):
git clone git://github.com/tarruda/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
Clone zsh-syntax-highlighting repository to ~/.zsh/zsh-syntax-highlighting (or anywhere else):
git clone git://github.com/jimmijj/zsh-syntax-highlighting ~/.zsh/zsh-syntax-highlighting
Load and enable autosuggestions; copy the following snippet and put it to your .zshrc file:
# Load zsh-syntax-highlighting.
source ~/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh