Skip to content

Instantly share code, notes, and snippets.

@bassu
bassu / config-3.5.4-i686
Created Apr 2, 2014
Optimized kernel config for 32 bit CentOS 5.x to be run on SmartOS Illumos-kvm Hypervisor
View config-3.5.4-i686
#
# Automatically generated file; DO NOT EDIT.
# Linux/i386 3.5.4 Kernel Configuration
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
@bassu
bassu / kernel-opt-3.5.spec
Created Apr 2, 2014
Optimized kernel 3.5 rpmbuild spec (similar to Joyent's but for 32 bit CentOS), to be run on SmartOS Illumus-kvm Hypervisor
View kernel-opt-3.5.spec
## Hacked by Bassu
## For CentOS 5.x. May have to recompile iptables.
## Modificatons:
# with_hdr 1
# kernel-lt is kernel-opt
# removed NoSource: 0
# Sources configs are new
# srpm with: mock -v --buildsrpm -r epel-5-i386 --target i686 --spec ~/rpmbuild/SPECS/kernel-opt-3.5.spec --sources ~/rpmbuild/SOURCES/ --resultdir ~/kernel-opt
# rpm with: mock -v --rebuild -r epel-5-i386 --target i686 --resultdir ~/kernel-opt ~/kernel-opt/kernel-opt-3.5.4-1.el5.centos.src.rpm
#
@bassu
bassu / Karabiner's private.xml
Created Aug 8, 2014
Command & Option swaps into Right Ctrl on Apple keyboards (Emacs style for Atom.app and such)
View Karabiner's private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Atom.app</name>
<appendix>Emacs style binding from PC keyboards by Bassu</appendix>
<appdef>
<appname>ATOM</appname>
<equal>com.github.atom</equal>
</appdef>
@bassu
bassu / init.el
Created Aug 13, 2014
Very quick and portable Emacs init file
View init.el
;;; package -- default emacs init by Bassu
;;; Commentary:
;;; very rough but portaable; may someday be tied into Cask
;;; Code:
;-------;
; REPO ;
;-------;
View gist:1df5fafe53d9cb0b8de2
package-activated-list is a variable defined in `package.el'.
Its value is
(ac-c-headers ac-emmet bash-completion c-eldoc css-eldoc distinguished-theme emmet-mode exec-path-from-shell flycheck go-autocomplete go-direx direx go-eldoc go-mode go-snippets highlight-indentation jedi epc ctable concurrent minimap neotree pkg-info epl popwin powerline python-environment deferred smartparens smex solarized-theme dash soothe-theme sr-speedbar subatomic-theme subatomic256-theme sublime-themes tern-auto-complete auto-complete popup tern ujelly-theme web-mode yasnippet zenburn-theme)
View index.html
<!DOCTYPE html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,900' rel='stylesheet' type='text/css'>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
html {
background: #fff;
}
View zfsonlinux-benchmark
ZFSOnLinux Benchmark On Stock Hardware
======================================
Hardware
--------
- Supermicro X8DTL
- 92GB RAM
- LSI 9211-4i HBA
- WD3000F9YZ 6Gbps 3TB x 4 HDDs
@bassu
bassu / zoloutofram
Created Nov 15, 2013
ZOL Out of RAM
View zoloutofram
Out of memory: Kill process 2813 (sshd) score 1 or sacrifice child
Killed process 2815 (bash) total-vm:108572kB, anon-rss:0kB, file-rss:716kB
init invoked oom-killer: gfp_mask=0x200da, order=0, oom_adj=0, oom_score_adj=0
init cpuset=/ mems_allowed=0
Pid: 1, comm: init Tainted: P O 3.4.61-9.el6.centos.alt.x86_64 #1
Call Trace:
[<ffffffff8111785b>] dump_header+0x8b/0x1d0
[<ffffffff8111732f>] ? find_lock_task_mm+0x2f/0x80
[<ffffffff81206e75>] ? security_capable_noaudit+0x15/0x20
[<ffffffff8126f270>] ? ___ratelimit+0xa0/0x120
@bassu
bassu / ZOL OOM Log for Behlendorf
Last active Dec 28, 2015
ZOL OOM Log for Behlendorf. The spl/slab and arcstat concatenation is at end of this file
View ZOL OOM Log for Behlendorf
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Linux version 3.4.61-9.el6.centos.alt.x86_64 (mockbuild@bn3.alt.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Wed Sep 11 15:34:17 UTC 2013
Command line: ro root=UUID=94bf0589-cc13-4e45-a8e7-3f7e3b383e23 rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_MD_UUID=57d163f2:904115e4:f08b19c3:347d9c81 SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_DM rd_NO_LVM rd_MD_UUID=89ca9bed:6f8d56ea:df10f673:9f7edfb7 rhgb quiet pcie_aspm=off
Freeing 9a-100 pfn range: 102 pages freed
1-1 mapping on 9a->100
Freeing bf780-100000 pfn range: 264320 pages freed
1-1 mapping on bf780->100000
Released 264422 pages of unused memory
Set 264422 page(s) to 1-1 mapping
View smartos-virtio-windows-xp.sh
#!/usr/bin/env bash
set -e
if [ -z "$iso" ] ; then
printf -- ">>> You must invoke with iso=/path/to/winxp.iso $(basename $0)\n"
exit 1
fi
if [ -z "$url" ] ; then