Skip to content

Instantly share code, notes, and snippets.

@bassu
bassu / Lenovo ThinkPad X230 Continous Review.md
Last active Sep 30, 2021
A Hacker's Ongoing Review of Lenovo ThinkPad X230
View Lenovo ThinkPad X230 Continous Review.md

A Hacker's Ongoing Review for Lenovo ThinkPad X230

For Arch Linux Wiki: https://wiki.archlinux.org/index.php/ThinkPad_X230

Upate Aug 30, 2014 The machine died. Hopefully it enjoyed it short life!

Update: Aug 02, 2014 One early morning, the machine died after waking up from to cold unsuspend. It didn't start after then. Even couldn't get into POST. Power LED only lit for a second or two. Hard reset of 30 seconds also failed. Before declaring motherboard totally toasted, gave it a last try as suggested by our good ol' friend Pablo Stafforini. Took it a apart, unplugged battery and CMOS battery and let it sit for nearly 11 hours. It WORKED like a preposterous CPR supposedly to a machine! What a joke ;)

@bassu
bassu / varnish-modules.md
Created Jan 21, 2020 — forked from fliphess/varnish-modules.md
Install varnish modules on ubuntu 16.04 xenial
View varnish-modules.md

Install varnish-modules on ubuntu 16.04 xenial

  1. Backup current configuration
mkdir -p /root/varnish && cp -rv /etc/varnish /root/varnish && cp /etc/default/varnish /root/varnish/varnish-default
  1. Install varnish key and repo from packagecloud:
@bassu
bassu / .bash-powerline.sh
Created Aug 1, 2019
Original bash powerline
View .bash-powerline.sh
#!/usr/bin/env bash
__powerline() {
# Unicode symbols
# readonly PS_SYMBOL_DARWIN=''
readonly PS_SYMBOL_LINUX='$'
readonly PS_SYMBOL_OTHER='%'
readonly GIT_BRANCH_SYMBOL=''
View gist:67733fc891afc2c8c8516f8a289791e0
SELECT a.datname,
c.relname,
l.transactionid,
l.mode,
l.GRANTED,
a.usename,
a.query,
a.query_start,
age(now(), a.query_start) AS "age",
a.pid
@bassu
bassu / haproxy.cfg
Created Apr 2, 2016 — forked from ryzy/haproxy.cfg
HAProxy - essentials for HTTP/2
View haproxy.cfg
frontend https-in
mode tcp
bind *:443 ssl crt /etc/ssl/dummy.pem alpn h2,http/1.1
use_backend nodes-http2 if { ssl_fc_alpn -i h2 }
default_backend nodes-http
backend nodes-http
server node1 web.server:80 check
backend nodes-http2
View smartos zfs feature flags
# zfs upgrade
This system is currently running ZFS filesystem version 5.
All filesystems are formatted with the current version.
# zpool upgrade -v
This system supports ZFS pool feature flags.
The following features are supported:
View init.el
;; emacs configuration
(push "/usr/local/bin" exec-path)
(add-to-list 'load-path "~/.emacs.d")
(setq make-backup-files nil)
(setq auto-save-default nil)
(setq-default tab-width 2)
(setq-default indent-tabs-mode nil)
(setq inhibit-startup-message t)
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
@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
@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