Skip to content

Instantly share code, notes, and snippets.

View hashmap's full-sized avatar

hashmap hashmap

  • Berlin, Germany
View GitHub Profile
use std::io::Read;
use std::net::{TcpListener, TcpStream};
use std::thread;
use std::time::Duration;
fn server() {
let listener = TcpListener::bind("0.0.0.0:3333").unwrap();
listener.set_nonblocking(true).expect("set nonblocking");
println!("Server listening on port 3333");
loop {
@hashmap
hashmap / init.vim
Created February 19, 2019 21:49
init.vim
"dein Scripts-----------------------------
if &compatible
set nocompatible " Be iMproved
endif
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" Or if you have Neovim >= 0.1.5
if (has("termguicolors"))
set termguicolors
const SIZE: usize = 2;
struct Message(Vec<u8>);
impl Message {
pub fn new() -> Message {
Message (vec![1,2,3,4,5,6,7,8])
}
}

Keybase proof

I hereby claim:

  • I am hashmap on github.
  • I am hashmap (https://keybase.io/hashmap) on keybase.
  • I have a public key whose fingerprint is 3E4A ACE3 6687 FCCC 1DBA 706D F423 90FB 9537 3715

To claim this, I am signing this object:

@hashmap
hashmap / immortal.go
Last active December 16, 2015 13:57
Manual test for story #108987020
package main
import (
"fmt"
"os"
"os/signal"
"strconv"
"time"
)
@hashmap
hashmap / gist:89b00ef36c2e0e59335e
Created November 21, 2015 16:49
integration fails
Failed examples:
rspec ./spec/integration/cli_stemcell_spec.rb:132 # cli: stemcell uploading a stemcell that already exists when the stemcell is local when using the --fix flag uploads stemcell
rspec ./spec/integration/cli_stemcell_spec.rb:175 # cli: stemcell uploading a stemcell that already exists when the stemcell is remote downloads the file
rspec ./spec/integration/cli_stemcell_spec.rb:191 # cli: stemcell uploading a stemcell that already exists when the stemcell is remote when the URL is being redirected follows the redirect
rspec ./spec/integration/cli_stemcell_spec.rb:204 # cli: stemcell uploading a stemcell that already exists when the stemcell is remote when the stemcell has already been uploaded when using the --skip-if-exists flag tells the user and does not exit as a failure
rspec ./spec/integration/cli_stemcell_spec.rb:211 # cli: stemcell uploading a stemcell that already exists when the stemcell is remote when the stemcell has already been uploaded when NOT using the --skip-if-exists flag tell
#!/usr/bin/env bash
# bin/detect <build-dir>
# Any awk web app must have app.awk file
if [ -f $1/app.awk ]; then
echo "gawk"
exit 0
fi
exit 1