Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| :bind-key -n C-k send-keys "clear && tmux clear-history; history -d $((\$HISTCMD-1))" \; send-keys "Enter" |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| $(window).on("scroll", function() { | |
| var scrollHeight = $(document).height(); | |
| var scrollPosition = $(window).height() + $(window).scrollTop(); | |
| if ((scrollHeight - scrollPosition) / scrollHeight === 0) { | |
| // when scroll to bottom of the page | |
| } | |
| }); |
| package-lock.json | |
| node_modules |
| " Cycle metasyntactic variables | |
| function! s:CycleMetasyntacticVariables(num) | |
| if type(a:num) != type(0) | |
| return | |
| endif | |
| let vars = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge', 'grault', 'garply', 'waldo', 'fred', 'plugh', 'xyzzy', 'thud'] | |
| let cvar = expand('<cword>') | |
| let i = index(vars, cvar) |
| /* Add the desktop-hidden class to any HTML tag that contains mobile specific content */ | |
| .desktop-hidden { | |
| *display:none !important; /* IE6-7 */ | |
| } | |
| @media \0 screen { | |
| .desktop-hidden { | |
| display:none !important; /* IE8 only */ |
foobar, foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud
Press minus + shift + s and return to chop/fold long lines!
If you use git on the command-line, you'll eventually find yourself wanting aliases for your most commonly-used commands. It's incredibly useful to be able to explore your repos with only a few keystrokes that eventually get hardcoded into muscle memory.
Some people don't add aliases because they don't want to have to adjust to not having them on a remote server. Personally, I find that having aliases doesn't mean I that forget the underlying commands, and aliases provide such a massive improvement to my workflow that it would be crazy not to have them.
The simplest way to add an alias for a specific git command is to use a standard bash alias.
# .bashrc