This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(file_utils). | |
-export([recursively_list_dir/1, | |
recursively_list_dir/2]). | |
% @type name() = string() | atom() | binary(). | |
-type name() :: string() | atom() | binary(). | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
NewerOlder