Skip to content

Instantly share code, notes, and snippets.

View isair's full-sized avatar

Baris Sencan isair

View GitHub Profile
{
"watermark": {
"image": "MovielalaLogo"
}
}
@isair
isair / launch-mbii.sh
Last active May 20, 2018 16:22
Script for starting up the MBII launcher on OS X
#!/usr/bin/env bash
MONO_HOME="/Library/Frameworks/Mono.framework"
MONO="$MONO_HOME/Versions/3.12.1/bin/mono"
if [ ! -d "$MONO_HOME" ]; then
echo "You don't have Mono installed. Please install version 3.12.1 from its official website." >&2
exit 1
fi
@isair
isair / 99-network-tuning.conf
Last active January 20, 2022 10:51
Better network configuration for Linux servers. Place under /etc/sysctl.d/
# http://www.nateware.com/linux-network-tuning-for-2013.html
# Increase Linux autotuning TCP buffer limits
# Set max to 16MB for 1GE and 32M (33554432) or 54M (56623104) for 10GE
# Don't set tcp_mem itself! Let the kernel scale it based on RAM.
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 16777216
net.core.wmem_default = 16777216
net.core.optmem_max = 40960
@isair
isair / svg2png.ts
Last active July 20, 2020 11:34
ts-node script for converting all SVG files in a directory to @1x @2x @3x PNG files, files are processed in parallel for optimal performance
import path from 'path';
import { exec } from 'child_process';
import fse from 'fs-extra';
import glob from 'glob-promise';
import pLimit from 'p-limit';
const imagesPath = path.resolve('./assets/svg');
const outputPath = path.resolve('./assets/images');
const concurrency = 2; // File count only. Actual parallelism is three times this.
@isair
isair / mirror-android.sh
Created April 14, 2020 17:18
Script to mirror and control your Android phone from your desktop (requires scrcpy)
#!/usr/bin/env bash
#killall usbaudio
killall scrcpy
#usbaudio &
scrcpy -m 1515 --max-fps 30 -f