Skip to content

Instantly share code, notes, and snippets.

View zhenglaizhang's full-sized avatar
🎯
Focusing

Zhenglai Zhang zhenglaizhang

🎯
Focusing
View GitHub Profile
@zhenglaizhang
zhenglaizhang / arch-linux-install
Created April 7, 2017 11:40 — forked from binaerbaum/arch-linux-install
Minimal instructions for installing arch linux on an UEFI NVMe system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swiss-french keymap
@zhenglaizhang
zhenglaizhang / win10-dev.md
Created February 21, 2017 07:46 — forked from wsargent/win10-dev.md
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Sadly, much of this pertains to Git, GPG, SSH, and Windows all not working, rather than Windows Subsystem for Linux. There is no unified command line experience for native Windows still -- instead, there's a bunch of different conflicting programs which all bring along their own environment and need to be told about each other.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

import sys, os
import shutil
from Crypto.Cipher import AES
def parse_m3u8_file(m3u8_file):
with open(m3u8_file, 'rb') as fp:
current_line = fp.readline().rstrip('\n')
while (current_line):
if current_line.startswith('#EXT-X-KEY'):
@zhenglaizhang
zhenglaizhang / ubuntu-clean.sh
Created December 8, 2016 05:28
Ubuntu 16.04 cleanup util
echo "cleaning up" &&
sudo apt-get -f install &&
sudo apt-get autoremove &&
sudo apt-get -y autoclean &&
sudo apt-get -y clean &&
echo "cleaning up DONE"
@zhenglaizhang
zhenglaizhang / ubuntu-scala-setup.sh
Last active December 8, 2016 05:42
Ubuntu 16.04 Scala development environment setup script
# zsh
sudo apt-get update && \
sudo apt-get install -y \
curl \
vim \
git \
zsh
# apt-get install zsh
# apt-get install git-core
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

Mac OS X 10.9 Mavericks

Custom recipe to get OS X 10.9 Mavericks running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install.

Install Software

The software selected is software that is "tried and true" --- software I need after any fresh install. I often install other software not listed here, but is handled in a case-by-case basis.

Install from App Store