Skip to content

Instantly share code, notes, and snippets.

@airtonix
airtonix / index.js
Created September 27, 2018 08:02 — forked from zkat/index.js
npx is cool
#!/usr/bin/env node
console.log('yay gist')

Replace 3ware disk w/ & w/o ZFS

Remove disk from ZFS (3ware)

Remove disk from zpool

  • Command: zpool offline <pool> <disk>
  • Example: zpool offline data da17

Remove from controller

  • Command: tw_cli /c0/pX remove
@airtonix
airtonix / makeiso.sh
Last active August 29, 2015 14:08 — forked from geekle/makeiso.sh
#!/bin/bash
# Creates a bootable ISO from CoreOS' PXE images.
# Also adds a run script to the OEM partition and converts the ISO so it can boot from USB media.
# Based heavily off https://github.com/nyarla/coreos-live-iso - Thanks Naoki!
set -e
# Default configurations
SYSLINUX_VERSION="6.02"
def _get_notes(prev_tag, next_tag):
with hide('stdout'):
commits = run("git log --graph --pretty=format:'%h - %s (%cr by %an)%d' "
+ "--abbrev-commit --date=relative"+ " %s..%s"
% (prev_tag, next_tag)).splitlines()
commits.pop() # prev_tag went out with the previous release notes.
commits.reverse() # order going down with time
commits = "\n".join(commits)
commits = re.sub(r"\\",r"__SUB__", commits)
commits = re.sub(r"/",r"\\", commits)
# Copyright (c) 2012, Bin Tan
# This file is distributed under the BSD Licence. See python-epub-builder-license.txt for details.
# James Outterside - Modified code from http://code.google.com/p/python-epub-builder/source/browse/trunk/epub.py to use
# use django templates instead of genshi
import itertools
import mimetypes
import os
import shutil
--[[
oUF Saul: 30100.05
Credits: P3lim for his layout and coding
I grants anyone the right to use this work for any purpose,
without any conditions, unless such conditions are required by law.
--]]