Skip to content

Instantly share code, notes, and snippets.

View r3b311i0n's full-sized avatar
🏠
Working from home

Amal Karunarathna r3b311i0n

🏠
Working from home
View GitHub Profile
@r3b311i0n
r3b311i0n / 99-watchman.conf
Last active June 12, 2019 17:45
Inotify watchman (put in /etc/sysctl.d)
fs.inotify.max_user_instances=1024
fs.inotify.max_user_watches=524288
@r3b311i0n
r3b311i0n / chrome.sh
Created June 1, 2018 05:17
For custom flag support (from AUR).
#!/bin/bash
# Allow users to override command-line options
if [[ -f ~/.config/chrome-flags.conf ]]; then
CHROME_USER_FLAGS="$(cat ~/.config/chrome-flags.conf)"
fi
# Launch
exec /opt/google/chrome/google-chrome $CHROME_USER_FLAGS "$@"
@r3b311i0n
r3b311i0n / split.sh
Created May 6, 2018 18:01
Split audio using cue sheet.
shnsplit -f CDImage.cue -t "%n - %t" -o "flac flac -s -8 -o %f -" CDImage.flac
@r3b311i0n
r3b311i0n / tslint.yaml
Last active February 22, 2018 18:47
Fancy TSlint configuration.
---
extends:
- tslint:latest
- tslint-react
rulesDirectory:
- node_modules/tslint-microsoft-contrib
rules:
ban-types:
- true
- - Object
@r3b311i0n
r3b311i0n / usb_modeswitch.sh
Created December 11, 2017 14:01
Manual usb_modeswitch command for Huawei 12d1:14fe 4G modem.
sudo usb_modeswitch -v 0x12d1 -p 0x14fe -V 0x12d1 -P 0x1506 -M 55534243123456780000000000000011062000000100000000000000000000
@r3b311i0n
r3b311i0n / font-locale-search.sh
Created December 6, 2017 07:30
Get all font files that correspond to given locale param.
fc-list -f '%{file}\n' :lang=ja
@r3b311i0n
r3b311i0n / gresource-extract.sh
Created November 27, 2017 21:54
Script for extracting gresource archives.
# The GResource file name
GR_FILE="gtk.gresource"
# The base folder of the extracted resources
GR_BASEDIR="/org/gnome/"
## Check for required utilities...
for REQUIRED_PROG in gresource
do
@r3b311i0n
r3b311i0n / tslint.json
Last active January 19, 2018 15:32
Fancy TSlint configuration.
{
"extends": [
"tslint:latest",
"tslint-react"
],
"rulesDirectory": [
"node_modules/tslint-microsoft-contrib"
],
"rules": {
"ban-types": [
@r3b311i0n
r3b311i0n / webpack.config.js
Created November 1, 2017 00:29
Webpack configuration for React + PCSS + Firebase.
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const path = require('path');
const workboxPlugin = require('workbox-webpack-plugin');
const webpack = require('webpack');
module.exports = (env) => {
if (env === 'dev') {
return {
context: path.resolve(__dirname, './'),
@r3b311i0n
r3b311i0n / tsconfig.json
Created November 1, 2017 00:28
TypeScript configuration for ESNext + React JSX.
{
"compilerOptions": {
"module": "es2015",
"moduleResolution": "node",
"target": "es2015",
"sourceMap": true,
"inlineSources": true,
"outDir": "./dist/",
"lib": [
"dom",