Skip to content

Instantly share code, notes, and snippets.

bassu

Block or report user

Report or block bassu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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 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 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)
@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 ;
;-------;
@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 / 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 / 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 / Lenovo ThinkPad X230 Continous Review.md
Last active May 26, 2019
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 ;)

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)
You can’t perform that action at this time.