If the output of the locale command does not include the line
LC_ALL=en_US.UTF-8
then you may need to do the following:
| #!/bin/sh | |
| if [ -z "$1" ]; then | |
| echo "usage: $0 path/to/decompressed/usernetes/release/" | |
| exit 1 | |
| fi | |
| if [ ! -d "$1" ]; then | |
| echo "usage: $0 path/to/decompressed/usernetes/release/" | |
| echo "path '$1' does not exist" | |
| exit 1 | |
| fi |
I want to SSH into an Ubuntu box with an encrypted home directory, and I prefer using publickey authentication.
Ubuntu allows you to encrypt your own home directory. If you insist, as I do, that you use publickey authentication for your SSH authentication (which is nearly two-factor authentication as long as you protect your private ID key with a passphrase), this presents a problem: to authenticate, you need your ~/.ssh/authorized_keys file accessible, but when you are not logged in, it is inaccessible.
| # center with 'colMeans()' - ref: http://gastonsanchez.com/visually-enforced/how-to/2014/01/15/Center-data-in-R/ | |
| center_colmeans <- function(x) { | |
| xcenter <- colMeans(x) | |
| x - rep(xcenter, rep.int(nrow(x), ncol(x))) | |
| } |
| #!/usr/bin/env bash | |
| export ROWCOL="$(stty -a | head -n 1 | grep columns | sed -n -e 's/speed [0-9]* baud; rows \([0-9]*\); columns \([0-9]*\);.*/export LINES=\1; export COLUMNS=\2 /; s/.*speed//; p')" | |
| $ROWCOL |
| procedure Apply(f, L) | |
| local result, x | |
| result := [] | |
| every x := !L do put(result, f(x)) | fail | |
| return result | |
| end | |
| procedure Reduce(f, L) | |
| if *L > 1 | |
| then return f( L[1], Reduce( f, L[2:0] ) ) |
| procedure co_bistable(off_state, on_state) | |
| local button, bistable_button, bistable_state | |
| /off_state := "off" | |
| /on_state := "on" | |
| bistable_button := bistable_state := button := off_state | |
| return create while button := ( | |
| if button ~== bistable_button | |
| then if (bistable_button := button) == on_state | |
| then bistable_state := if bistable_state == off_state | |
| then on_state |
| @set ERRORLEVEL=&setlocal&echo off | |
| :: ref: https://gist.github.com/eschen42/dec433b73edf5090c62ffe854604bdf6 | |
| set ARG1=%1 | |
| if not defined ARG1 ( | |
| echo usage: "%~nx0" executable-name [/a] | |
| exit /b -87 | |
| ) | |
| set ALL=FALSE | |
| set ARG2=%2 | |
| if defined ARG2 ( |
| " make vim more useful at the expense of vim compatibility | |
| set nocompatible | |
| " source $VIMRUNTIME/vimrc_example.vim | |
| source $VIMRUNTIME/gvimrc_example.vim | |
| " uncomment the next line to make ^C ^X ^V exchange data with the clipboard | |
| "source $VIMRUNTIME/mswin.vim | |
| " behave xterm | |
| set selectmode=mouse | |
| set guifont=Courier:h10 | |
| " Colorscheme peachpuff |