Skip to content

Instantly share code, notes, and snippets.

@smcnamara3
smcnamara3 / zfs-setup.sh
Created March 25, 2016 07:54
ZFS root on Xenial - personal fork of http://pastebin.com/raw/fa83QrBk
#!/bin/bash
# ZFS-setup.sh 2016-03-24 19:42
# Auto-installer for clean new system using root on zfs, and optionally on
# luks encrypted disks. It installs Ubuntu 14.04.04 or 16.04 with everything
# needed to support ZFS and potentially LUKS. Without LUKS everything lives
# in the main rpool pool. With LUKS then /boot lives in its own boot pool.
# Grub2 is installed to all disks, so the system can boot cleanly from *any*
# disk, even with a failed disk.
@zhuowei
zhuowei / angler_partitioninfo.txt
Created December 31, 2015 23:39
Huawei Nexus 6P (Angler) partition information
Found valid GPT with protective MBR; using GPT
Disk /dev/block/mmcblk0: 61071360 sectors, 1148M
Logical sector size: 512
Disk identifier (GUID): 98101b32-bbe2-4bf2-a06e-2bb33d000c20
Partition table holds up to 44 entries
First usable sector is 34, last usable sector is 61071326
Number Start (sector) End (sector) Size Code Name
1 16384 180223 80.0M 0700 modem
@fajarnugraha
fajarnugraha / zfsroot.lua
Last active November 7, 2016 09:45
Grub lua script to enable automatic creation of grub menu entries on zfs root. Download to /rpool/grub/zfsroot.lua
-- Change this two variables with your actual setup
rpool="rpool"
zfs_rootdir="ROOT"
-- End of user-editable section
ds = ""
snap = ""
snap_dir = ""
function find_kernel_pair (name)
@andrewkroh
andrewkroh / sshd
Last active April 11, 2017 13:57
Google Authenticator PAM - Vagrant User SSH Exception
#%PAM-1.0
# Skip Google Authenticator for the vagrant user:
auth [success=1 default=ignore] pam_succeed_if.so user = vagrant
auth required pam_google_authenticator.so
auth required pam_unix.so
auth required pam_sepermit.so
auth include password-auth
account required pam_nologin.so
@aaronhalford
aaronhalford / chromeos-crosh-custom-setup.md
Created November 28, 2014 19:59
Customize ChromeOS Crosh Terminal with Custom Fonts and Solarized Dark Theme

Customize Chromebook Chrosh Shell Environment

Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time

Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.

Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.

Custom Fonts

@rbranson
rbranson / gist:03d88e3733c6ee098a89
Last active July 25, 2017 15:17
My Thoughts on Rust

Rust is the first language that has emerged in the past few years that solves enough of my problems that it would be worth not only learning & teaching an entirely new language, but also sacrificing the maturity of the language ecosystems I’ve become accustomed to.

I highly suggest you read the "Guide" provided by the language developers or this won't make much sense. These are just some of my thoughts and are intended to highlight particular things that stand out to me. I am just a practitioner and not an expert in any of these languages, so I have probably made some incorrect assumptions and out-of-date assertions. Bare with me.

Rust feels like the first time momentum has gained behind a true systems programming language that uses modern PL design techniques to prevent common errors when dealing with memory. It seems like others have previously either been too anemic to be worth adopting or too abstract to provide proper control. The type system and assignment semantics are designed specifically to preven

@mblarsen
mblarsen / deploy.yaml
Last active July 24, 2022 13:27
Solution for `git clone` using Ansible for repos with private submodules with github deploy keys
# Problem:
#
# If you use git submodules linking two private github repos, you'll need to create a separate deploy key for each.
# Multiple keys are not supported by Ansible, nor does ansible (when running git module) resort to your `.ssh/config` file.
# This means your ansible playbook will hang in this case.
#
# You can however use the ansible git module to checkout your repo in multiple steps, like this:
#
- hosts: webserver
vars:
@komuw
komuw / enable vt-x in chromebook
Last active April 11, 2024 23:33
How To enable VT-x support in chromebook
Generously taken from this discussion; https://github.com/dnschneid/crouton/issues/675
They've created a wiki: https://github.com/dnschneid/crouton/wiki/Repack-kernel-to-Enable-VT_x-for-Virtualbox
You should check it out to see if anything has changed.
A. first of all install virtualbox correctly: https://gist.github.com/komuW/10991598. then;
1.Open a shell on your Chrome OS
ie while in in chromeOS; open browser, then ctrl+alt+T, then type shell, then press enter
2.Disable verified boot :
--- scapy-2.1.0-rfmon/scapy/arch/pcapdnet.py 2009-09-23 10:27:36.000000000 -0400
+++ scapy-2.1.0/scapy/arch/pcapdnet.py 2014-04-11 20:54:49.000000000 -0400
@@ -52,7 +52,14 @@
class _PcapWrapper_libpcap:
def __init__(self, *args, **kargs):
self.pcap = pcap.pcapObject()
- self.pcap.open_live(*args, **kargs)
+ if sys.platform == 'darwin' and 'pcap_set_rfmon' not in dir(self.pcap):
+ warning("Mac OS WiFI monitor mode not supported unless python-libpcap patched for OS X is used.")
+
diff -ru pylibpcap-0.6.4/pcap.c pylibpcap-0.6.4-mac/pcap.c
--- pylibpcap-0.6.4/pcap.c 2012-01-05 19:13:47.000000000 -0500
+++ pylibpcap-0.6.4-mac/pcap.c 2014-04-11 20:29:02.000000000 -0400
@@ -1,15 +1,16 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
- * Version 1.3.31
- *
- * This file is not intended to be easily readable and contains a number of
+ * Version 3.0.0