Skip to content

Instantly share code, notes, and snippets.

@lwis
lwis / README.md
Created April 7, 2018 11:04
Arch Linux (LVM, LUKS, EFI)

Arch Linux

Installation procedure (encrypted LVM on EFI):

  1. Ensure running under EFI # ls /sys/firmware/efi/efivars
  2. Use wifi-menu to connect to network
  3. # timedatectl set-ntp true
  4. Update packages and install reflector: # pacman -Syyu reflector
  5. Download latest mirrors # reflector --country 'United Kingdom' --latest 10 --age 24 --sort rate --save /etc/pacman.d/mirrorlist
  6. Create partitons:
@lwis
lwis / gist:9c4eb28ca8872c38c11a
Created December 27, 2015 10:21
Git tag Gradle build
def getGitCommit = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout
}
return stdout.toString().trim()
}
android {
@lwis
lwis / update.sh
Created April 29, 2015 17:00
Update OpenELEC with nightly
#!/bin/bash
# Distributed under the terms of the BSD License.
# Copyright (c) 2012 Phil Cryer phil@philcryer.com
# Source https://gist.github.com/gists/3333039
# DESCRIPTION:
# This code updates OpenELEC on Raspberry PI to any available dev version you want
# The script to install the latest version did install the latest, but then failed to run :(
# This script allowed me to try another version (a few days older), which worked :)
@lwis
lwis / script.py
Created March 16, 2015 12:09
Download and generate digests for all links in content
import hashlib, re, urllib
resources = """<text with links in goes here>"""
def hashfile(afile, hasher, blocksize=65536):
buf = afile.read(blocksize)
while len(buf) > 0:
hasher.update(buf)
buf = afile.read(blocksize)
return hasher.hexdigest()
#!/bin/bash
# This script is edited by Brice Dutheil
# See there in french http://blog.arkey.fr/2012/07/30/script-pour-installer-le-jdk-5-sur-macosx-lion/
# Translate button is broken for now, please use Google to translate this website.
#
# 2014/02/10 Updated the script to run on OSX 10.9 Maverick
#
# 2013/05/11 Added a few more guidance when Java Preferences is not available anymore
# Added a simple example of a JDK switch function.
@lwis
lwis / gist:1a7aa2c504c076304311
Last active August 29, 2015 14:13
keybase.md
### Keybase proof
I hereby claim:
* I am lwis on github.
* I am lwis (https://keybase.io/lwis) on keybase.
* I have a public key whose fingerprint is 47F3 CA99 D173 8F5E 93DA 02CF 3E4F 5398 B837 176F
To claim this, I am signing this object: