Skip to content

Instantly share code, notes, and snippets.

View shaneutt's full-sized avatar
🔴
Extremely Busy

Shane Utt shaneutt

🔴
Extremely Busy
View GitHub Profile
@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())
}
}
@shaneutt
shaneutt / README.txt
Created March 9, 2022 19:17 — forked from ncw/README.txt
Client side certificates with go
This demonstrates how to make client side certificates with go
First generate the certificates with
./makecert.sh test@test.com
Run the server in one terminal
go run server.go
@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().
@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;
@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"