Skip to content

Instantly share code, notes, and snippets.

@fnky
fnky / ANSI.md
Last active Dec 10, 2022
ANSI Escape Codes
View ANSI.md

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@bryfry
bryfry / gzip.go
Last active Nov 22, 2022
Idiomatic golang net/http gzip transparent compression (works with Alice)
View gzip.go
package main
import (
"compress/gzip"
"io"
"net/http"
"strings"
)
// Gzip Compression
@ruliana
ruliana / bootstrap-chef-solo.sh
Last active Dec 14, 2015
Bootstrap Chef Solo for Ruby-2.0.0-p0 (run it with "sudo" because it installs ruby in "/usr/local")
View bootstrap-chef-solo.sh
#!/usr/bin/env bash
# Pre-requisites
apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev
# Download and compile Ruby 2.0.0-p0
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz