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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@r3b311i0n
r3b311i0n / totem.thumbnailer
Created October 11, 2017 17:16
Totem config for letting ffmpegthumbnailer handle videos.
[Thumbnailer Entry]
TryExec=/usr/bin/totem-video-thumbnailer
Exec=/usr/bin/totem-video-thumbnailer -s %s %u %o
MimeType=application/ogg;application/ram;application/sdp;application/vnd.apple.mpegurl;application/vnd.ms-asf;application/vnd.ms-wpl;application/vnd.rn-realmedia;application/vnd.rn-realmedia-vbr;application/x-extension-m4a;application/x-extension-mp4;application/x-flash-video;application/x-matroska;application/x-netshow-channel;application/x-ogg;application/x-quicktimeplayer;application/x-shorten;image/vnd.rn-realpix;image/x-pict;misc/ultravox;text/x-google-video-pointer;video/3gpp2;video/mpeg-system;video/x-ms-asf-plugin;video/x-theora;video/x-totem-stream;audio/x-pn-realaudio;audio/3gpp;audio/3gpp2;audio/aac;audio/ac3;audio/AMR;audio/AMR-WB;audio/basic;audio/dv;audio/eac3;audio/flac;audio/m4a;audio/midi;audio/mp1;audio/mp2;audio/mp3;audio/mp4;audio/mpeg;audio/mpg;audio/ogg;audio/opus;audio/prs.sid;audio/scpls;audio/vnd.rn-realaudio;audio/wav;audio/webm;audio/x-aac;audio/x-aiff;audio/x-ape;audio/x-f
@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",
@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 / 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 / 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 / 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 / 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 / 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 / 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