Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
#!/usr/bin/env bash | |
uninstall() { | |
list=`gem list --no-versions` | |
for gem in $list; do | |
gem uninstall $gem -aIx | |
done | |
gem list | |
gem install bundler | |
} |
Install convmv if you don't have it
sudo apt-get install convmv
Convert all files in a directory from NFD to NFC:
convmv -r -f utf8 -t utf8 --nfc --notest .
def timestamp | |
Time.now.to_i | |
end |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)section .data | |
char_buffer db 0 | |
section .text | |
global _start | |
_start: | |
mov r12, 0 | |
.loop: | |
call read_char |
#!/bin/bash | |
regions=(local ca-central-1 eu-central-1 ap-southeast-1 ap-northeast-1 us-east-1) | |
image_name_base="cache-bench" | |
image_sizes_in_mb=(64 512 1024) | |
dockerfile="Dockerfile.sample" | |
log_file=docker-bench.log |
#!/bin/bash | |
set -e | |
registry_version="2" | |
local_registry_port="5000" | |
local_registry_name="localhost" | |
local_registry_url="${local_registry_name}:${local_registry_port}" | |
docker_image_name="$SEMAPHORE_REPO_SLUG" | |
base_image_name="${local_registry_url}/${docker_image_name}" |
# Create a directory | |
mkdir ~/tmux-install | |
cd ~/tmux-install | |
# Get the files | |
curl -OL https://www.openssl.org/source/openssl-1.0.2l.tar.gz | |
curl -OL https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz | |
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz | |
# Extract them |
#!/bin/bash | |
# | |
# Compile tmux from sources on OSX 10.13.3 (High Sierra) | |
# | |
# Latest tmux | |
TMUX_VER=2.6 | |
# Pre-requisites | |
# Latest libevent | |
LIBEVENT_VER=2.1.8-stable |
; | |
; the "monitor ROM" of an apple 1 fit in one page (256 bytes). | |
; | |
; this is my attempt to take the disassembled code, give names to the | |
; variables and routines, and try to document how it worked. | |
; | |
; | |
; an apple 1 had 8KB of RAM (more, if you hacked on the motherboard), and a | |
; peripheral chip that drove the keyboard and video. the video was run by a | |
; side processor that could treat the display as an append-only terminal that |