Skip to content

Instantly share code, notes, and snippets.

View ictus4u's full-sized avatar
🚀

Walter Gomez ictus4u

🚀
View GitHub Profile
@pksunkara
pksunkara / config
Last active July 21, 2024 22:19
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@l15n
l15n / git-branches-by-commit-date.sh
Created July 13, 2012 08:47 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit's author and author date for each branch. Sort by most recent commit's author date.
# 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
@berlinbrown
berlinbrown / gist:4583728
Created January 21, 2013 05:05
Simplest Possible Web Crawler with C++
//============================================================================
// 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
//============================================================================
@artagnon
artagnon / gmail-filters.txt
Created March 23, 2013 06:40
GMail filters for high-volume lists
# 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:artagnon@gmail.com, to:git@vger.kernel.org OR cc:git@vger.kernel.org)
Do: Apply label "git"
Match: list:"<git.vger.kernel.org>" -{to:artagnon@gmail.com, cc:artagnon@gmail.com, from:artagnon@gmail.com}
Do: Skip Inbox, Apply label "git"
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@ismell
ismell / setup-bridge.sh
Last active October 24, 2022 04:37 — forked from anonymous/setup-bridge.sh
Scripts to re-create the docker0 bridge and setup a different ip subnet
#!/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
@mwhite
mwhite / git-aliases.md
Last active July 18, 2024 03:14
The Ultimate Git Alias Setup

The Ultimate Git Alias Setup

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
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@sbz
sbz / gitlab.py
Created April 23, 2014 09:10
gitlab: list your groups and projects using api v3
#!/usr/bin/env python
import os
import requests
import subprocess
import sys
from pprint import pprint as pp
TOKEN = 'YOUR_TOKEN'
FROM base/archlinux
RUN echo "installing openldap" \
&& sed 's/^CheckSpace/# CheckSpace/g' -i /etc/pacman.conf \
&& pacman -Syyu --noconfirm \
&& sed 's/^# CheckSpace/CheckSpace/g' -i /etc/pacman.conf \
&& pacman -S --noconfirm openldap
RUN echo "configuring openldap" \
&& sed -i 's/^suffix.*/suffix\t"dc=example,dc=org"/' /etc/openldap/slapd.conf \