Skip to content

Instantly share code, notes, and snippets.

@digitaljhelms
digitaljhelms / gist:4287848
Last active Jan 20, 2022
Git/GitHub branching standards & conventions
View gist:4287848

Branching

Quick Legend

Instance Branch Description, Instructions, Notes
@davidbalbert
davidbalbert / gist:6815258
Last active Oct 20, 2021
How to install custom SSL certificates on an ASUS RT-N66U running asuswrt-merlin
View gist:6815258
###########################################
# IMPORTANT NOTE:
#
# As of asuswrt-merlin 380.67 Beta, you
# can now configure SSL certificates from
# the Webui, making these instructions
# unnecessary.
###########################################
@pascalduez
pascalduez / SassMeister-input.scss
Last active Nov 8, 2021
Some Sass string functions: capitalize, ucwords, camelize, ...
View SassMeister-input.scss
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
// Capitalize string
// --------------------------------------------------------------------------------
// @param [string] $string
// --------------------------------------------------------------------------------
// @return [string]
@squarism
squarism / iterm2.md
Last active Jan 20, 2022
An iTerm2 Cheatsheet
View iterm2.md

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@nepsilon
nepsilon / cron-tips.md
Last active Jul 7, 2017
Better using Crontab — First published in fullweb.io issue #42
View cron-tips.md

Better using Crontab

Here are a few tips to get more out of Cron:

  • Test your scripts using Cron limited environment
  • Have it send you report to another email than root@locahost
  • Make it use another shell.
# Cron only provides a limited environment.
# To simulate it to test run your scripts
@nepsilon
nepsilon / comm-cli-tip.md
Last active Feb 19, 2017
CLI: Output the difference between 2 files — First published on fullweb.io issue #43
View comm-cli-tip.md

CLI: Output the difference between 2 files

Thinking of using diff? Try comm, its sole purpose is to compare 2 sorted files line by line.

Show lines in A.txt but NOT in B.txt:

comm -2 -3 A.txt B.txt

If the files aren’t sorted, use:

@nepsilon
nepsilon / a-better-setup-for-git.md
Last active Oct 19, 2020
A better setup for Git — First published in fullweb.io issue #46
View a-better-setup-for-git.md

A better setup for Git

Git default configuration is good but it can be personalized to improve your workflow efficiency. Here are some good lines to put in your ~/.gitconfig:

# The basics, who you commit as:
[user]
  name = John Doe
  email = john@doe.org
@nepsilon
nepsilon / git-grep-code.md
Last active Nov 22, 2016
How to grep search committed code in git? — First published on fullweb.io issue #47
View git-grep-code.md

How to grep search committed code in git?

Search working tree for text matching regular expression regexp:

git grep regexp 

Search working tree for lines of text matching regexp A or B:

git grep -e A --or -e B 
@jamischarles
jamischarles / .npm_install_autocomplete_bash
Last active Jul 13, 2016
npm install autocompletion for bash. Provides content of `~/.npm` as autocomplete options for `npm install` https://medium.com/@jamischarles/adding-autocomplete-to-npm-install-5efd3c424067#.8w0jzkh3w
View .npm_install_autocomplete_bash
#!/usr/bin/env bash #adding this to force silly gist highlighting. REMOVE THIS
# BASH standalone npm install autocomplete. Add this to ~/.bashrc file.
_npm_install_completion () {
local words cword
if type _get_comp_words_by_ref &>/dev/null; then
_get_comp_words_by_ref -n = -n @ -w words -i cword
else
cword="$COMP_CWORD"
words=("${COMP_WORDS[@]}")
@nepsilon
nepsilon / gitignore.md
Last active Dec 13, 2019
Understand what .gitignore rule is ignoring your files — First published in fullweb.io issue #54
View gitignore.md

Understand what .gitignore rule is ignoring your files

Ready to commit, you fire your git status and you don’t see your files 🤔.

Use this command to ask Git what rule is causing this ignore:

$ git check-ignore -v filename

For instance to see what rule ignores tests.pyc: