Skip to content

Instantly share code, notes, and snippets.

View bassu's full-sized avatar
I may be slow to respond.

Abbas bassu

I may be slow to respond.
View GitHub Profile
bassu /
Last active September 25, 2023 10:24
macOS: Chrome: RAM disk for write intensive usage
set -eu
SIZE=3299328 # 1.5GiB i.e. 2048 = 1MB
CACHE_PREFIX="${HOME}/Library/Application Support/Google/Chrome/"
rm -rf "${CACHE_PREFIX}"
mkdir -p "${CACHE_PREFIX}"
mkdir -p "${SYNC_PREFIX}"
bassu /
Created January 21, 2020 06:36 — forked from fliphess/
Install varnish modules on ubuntu 16.04 xenial

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 /
Created August 1, 2019 21:16
Original bash powerline
#!/usr/bin/env bash
__powerline() {
# Unicode symbols
# readonly PS_SYMBOL_DARWIN=''
readonly PS_SYMBOL_LINUX='$'
readonly PS_SYMBOL_OTHER='%'
readonly GIT_BRANCH_SYMBOL='⑂ '
bassu / gist:67733fc891afc2c8c8516f8a289791e0
Created August 20, 2018 12:09
pgsql locks monitoring
View gist:67733fc891afc2c8c8516f8a289791e0
SELECT a.datname,
age(now(), a.query_start) AS "age",
bassu / haproxy.cfg
Created April 2, 2016 18:03 — 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
bassu / index.html
Last active August 29, 2015 14:14 — forked from anonymous/index.html
View index.html
<!DOCTYPE html>
<link href=',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 / init.el
Created August 13, 2014 07:14
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 / Karabiner's private.xml
Created August 8, 2014 13:39
Command & Option swaps into Right Ctrl on Apple keyboards (Emacs style for and such)
View Karabiner's private.xml
<?xml version="1.0"?>
<appendix>Emacs style binding from PC keyboards by Bassu</appendix>
bassu / kernel-opt-3.5.spec
Created April 2, 2014 18:17
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