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| # vi: ft=dosini | |
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = [email protected] | |
| username = pksunkara | |
| [core] | |
| editor = nvim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| pager = delta | |
| [column] |
| # Credit http://stackoverflow.com/a/2514279 | |
| for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ai %ar by %an" $branch | head -n 1` \\t$branch; done | sort -r |
| //============================================================================ | |
| // Name : OctaneCrawler.cpp | |
| // Author : Berlin Brown (berlin dot brown at gmail.com) | |
| // Version : | |
| // Copyright : Copyright Berlin Brown 2012-2013 | |
| // License : BSD | |
| // Description : This is the simplest possible web crawler in C++ | |
| // Uses boost_regex and boost_algorithm | |
| //============================================================================ |
| # I use two rules for the git list. Note: don't use "from:me", because that matches email addresses with a "me" in them. | |
| Match: (from:[email protected], to:[email protected] OR cc:[email protected]) | |
| Do: Apply label "git" | |
| Match: list:"<git.vger.kernel.org>" -{to:[email protected], cc:[email protected], from:[email protected]} | |
| Do: Skip Inbox, Apply label "git" |
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| #!/bin/bash -e | |
| IFADDR="192.168.3.1/24" | |
| if [[ ! ip link show docker0 ]]; then | |
| ip link add docker0 type bridge | |
| ip addr add "$IFADDR" dev docker0 | |
| ip link set docker0 up | |
| iptables -t nat -A POSTROUTING -s "$IFADDR" ! -d "$IFADDR" -j MASQUERADE | |
| fi |
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| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| # ----------------------------------------------------------------- | |
| # .gitignore | |
| # Bare Minimum Git | |
| # https://salferrarello.com/starter-gitignore-file/ | |
| # ver 20221125 | |
| # | |
| # From the root of your project run | |
| # curl -O https://gist.githubusercontent.com/salcode/10017553/raw/.gitignore | |
| # to download this file | |
| # |
| #!/usr/bin/env python | |
| import os | |
| import requests | |
| import subprocess | |
| import sys | |
| from pprint import pprint as pp | |
| TOKEN = 'YOUR_TOKEN' |