Skip to content

Instantly share code, notes, and snippets.

@timstott
timstott / cheatsheets.md
Last active August 29, 2015 14:05
cheatsheets
View cheatsheets.md

Dev Cheat Sheets

Personal collection of commands and snippets that just won't stay in my head.

@timstott
timstott / basicNodeServer.js
Created September 19, 2015 17:37
Basic node.js server
View basicNodeServer.js
#!/usr/bin/env node
var http = require('http');
// Port to listen on
const PORT=8085;
// Function handling request and response
function handleRequest(request, response){
console.log(request);
@timstott
timstott / schema-registry.properties
Created November 5, 2015 21:20
schema-registry.properties
View schema-registry.properties
port=8081
kafkastore.connection.url=localhost:2181
kafkastore.topic=_schemas
debug=true
kafkastore.timeout.ms = 30000
@timstott
timstott / tmux.md
Last active February 7, 2018 11:56
Tool Tips
View tmux.md

Move current windows to x position move-window -t 0

Access tmux clipboard tmux show-buffer | jq . -S

@timstott
timstott / keybase.md
Created May 26, 2017 07:46
Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am timstott on github.
  • I am timstott (https://keybase.io/timstott) on keybase.
  • I have a public key whose fingerprint is 9B24 48CD EA77 B493 2F42 24B5 0CDE 05FC 2683 594F

To claim this, I am signing this object:

@timstott
timstott / README.md
Created August 15, 2017 19:11
Run Ethereum Parity with Docker
View README.md

Instructions

docker-compose up -d
docker-compose exec parity /parity/parity signer new-token | grep http
# browse to url
@timstott
timstott / howtovim.md
Last active May 21, 2019 14:26
How To Vim
View howtovim.md

Argument list

Add to the argument list

command outcome
:args ag -l spec_helper add command result to args list

Operate on the argument list

@timstott
timstott / configuration.nix
Last active January 21, 2020 22:10
Convert a machine provisioned by NixOps to standalone NixOS (reddit https://redd.it/agpq3o)
View configuration.nix
{ config, lib, pkgs, ... }: {
config = {
boot.kernelModules = [];
networking = {
extraHosts = ''
xxx.xxx.xxx.xxx bob-remote bob-remote-unencrypted
127.0.0.1 bob-remote-encrypted
'';
firewall.trustedInterfaces = [];
publicIPv4 = "xxx.xxx.xxx.xxx";
@timstott
timstott / disable-repaint-with-ctrl-l.patch
Created July 6, 2019 11:33
disable mosh repaint (CTRL-L) nixpkgs overlay
View disable-repaint-with-ctrl-l.patch
diff --git a/src/frontend/stmclient.cc b/src/frontend/stmclient.cc
index 8523f9c..8cfbdae 100644
--- a/src/frontend/stmclient.cc
+++ b/src/frontend/stmclient.cc
@@ -373,9 +373,6 @@ bool STMClient::process_user_input( int fd )
lf_entered = ( (the_byte == 0x0A) || (the_byte == 0x0D) ); /* LineFeed, Ctrl-J, '\n' or CarriageReturn, Ctrl-M, '\r' */
- if ( the_byte == 0x0C ) { /* Ctrl-L */
- repaint_requested = true;
@timstott
timstott / shell.nix
Created September 25, 2019 21:40
Ruby project nix shell
View shell.nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
name = "hello-world-ruby-v1";
buildInputs = [
ruby_2_6
];