Skip to content

Instantly share code, notes, and snippets.

View shaneutt's full-sized avatar
🔴
I am completely unavailable

Shane Utt shaneutt

🔴
I am completely unavailable
View GitHub Profile
@mrinalwadhwa
mrinalwadhwa / file_utils.erl
Created July 2, 2011 03:31
Erlang: list all the files in a directory and recursively in all its sub directories
-module(file_utils).
-export([recursively_list_dir/1,
recursively_list_dir/2]).
% @type name() = string() | atom() | binary().
-type name() :: string() | atom() | binary().
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
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

@willurd
willurd / web-servers.md
Last active April 28, 2024 21:38
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
@weakish
weakish / 50-marblemouse.conf
Created September 13, 2013 09:24
configure Logitech Marble trackball on Debian wheezy
# put this file under /usr/share/X11/xorg.conf.d/
# The default setting for middle-button-enabled in Gnome is false.
# Since Gnome settings are applied after xorg settings, this results in middle button emulation disabled. To fix this, run the following in a terminal:
#
# gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true
#
# This needs to be done only once for each user - Gnome remembers this setting between logins.
Section "InputClass"
@rxaviers
rxaviers / gist:7360908
Last active May 3, 2024 16:14
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@kendellfab
kendellfab / read_line.go
Created November 11, 2013 17:41
Golang --> Read file line by line.
func readLine(path string) {
inFile, _ := os.Open(path)
defer inFile.Close()
scanner := bufio.NewScanner(inFile)
scanner.Split(bufio.ScanLines)
for scanner.Scan() {
fmt.Println(scanner.Text())
}
}
@mathieulegrand
mathieulegrand / connect.rs
Last active March 10, 2018 19:57
simple connect to server:443 in Rust
// Rust 0.10-pre (Tue Mar 18, 2014)
// $ rustc -L rust-openssl/build/ -L rust-toml/lib doing.rs
// assuming https://github.com/sfackler/rust-openssl is cloned and compiled,
// and https://github.com/mneumann/rust-tom is cloned and compiled
#[feature(macro_rules)];
#[allow(deprecated_owned_vector)];
extern crate openssl;
extern crate serialize;

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

@codref
codref / go-ssh-reverse-tunnel.go
Last active October 23, 2023 13:32
Go SSH reverse tunnel implementation (SSH -R)
/*
Go-Language implementation of an SSH Reverse Tunnel, the equivalent of below SSH command:
ssh -R 8080:127.0.0.1:8080 operatore@146.148.22.123
which opens a tunnel between the two endpoints and permit to exchange information on this direction:
server:8080 -----> client:8080
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 3, 2024 15:55
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example