Skip to content

Instantly share code, notes, and snippets.

View jiping-s's full-sized avatar

Ji-Ping Shen jiping-s

  • RELEX Oy
  • Helsinki, Finland
View GitHub Profile
@jiping-s
jiping-s / Dolby_ProLogic_II_(5.1_upmix)_IIR.txt
Created December 3, 2020 19:51
Dolby ProLogic II (5.1_upmix) IIR
# Dolby ProLogic II upmix to 5.1 (backward compliant up to Dolby Surround)
# Jose Linares -Dogway-
# >> https://github.com/Dogway
Copy: LI=L RI=R
Channel: LI RI
Delay: 13 ms
Filter 1: ON HPQ Fc 100 Hz Q 0.541
@jiping-s
jiping-s / config.txt
Created December 3, 2020 19:48
Equalizer APO config
Device: Speakers Sound Blaster X7 {6a2bef22-66a1-4aad-a939-17d7d1687a8d}
Preamp: -18 dB
Include: Dolby_ProLogic_II_(5.1_upmix)_IIR.txt
Channel: ALL
Copy: R=R+0.5*C+0.5*SUB L=L+0.5*C+0.5*SUB
@jiping-s
jiping-s / gtk.css
Created March 15, 2019 20:41
cdetheme/gtk-3.20/gtk.css with CSD (Client-Side Decorations)
@import url("colors.css");
@import url("widgets.css");
.csd > headerbar {
border: none;
}
.csd:not(.popup) > *:first-child {
border: solid 2px @bg_hi;
box-shadow: 0px 2px 8px 3px alpha(black, 0.5);
@jiping-s
jiping-s / SketchUp-wine64.sh
Created March 3, 2019 05:48
Install SketchUp on wine64, Ubuntu 18.04
winetricks corefonts
# switch to XP
wineboot -s
wineserver -k
wine vc_redist.x86.exe
wine vc_redist.x64.exe
# switch to win7
wineboot -s
wineserver -k
wineboot
@jiping-s
jiping-s / .profile
Last active March 11, 2019 15:59
.profile to create cache folders on tmpfs (RAM disk)
# ~/.profile: executed by the command interpreter for login shells.
if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
@jiping-s
jiping-s / safe_chromium.c
Last active March 3, 2019 12:54
block nasty chrome & spotify ports
// gcc -shared -fPIC -Wall -o safe_chromium.so safe_chromium.c
// sudo install safe_chromium.so /usr/local/lib/
// LD_PRELOAD=/usr/local/lib/safe_chromium.so spotify
#include <dlfcn.h>
#include <libgen.h>
#include <stdio.h>
#include <string.h>
#define AF_INET 2
@jiping-s
jiping-s / MSI_LED_OFF.bat
Created October 8, 2018 17:05
Turn off LED lights on MSI motherboard
start "LED" "C:\Program Files (x86)\MSI\Gaming APP\MSI_LED.exe"
timeout /t 1
rem TURN ON
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MSI\GamingApp\LED /v LEDStatus /t REG_BINARY /d 010000 /f
timeout /t 1
rem TURN OFF
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MSI\GamingApp\LED /v LEDStatus /t REG_BINARY /d 020000 /f
timeout /t 1
taskkill /IM msi_led.exe /F
@jiping-s
jiping-s / T4.sublime-syntax
Created August 29, 2018 17:48
T4 syntax for Sublime Text 3
%YAML 1.2
---
# http://www.sublimetext.com/docs/3/syntax.html
name: T4
file_extensions:
- t4
- tt
scope: source.t4
contexts:
main:
@jiping-s
jiping-s / nmap.log
Created July 23, 2018 07:19
Beoplay A6 network scan
T:\>nmap -v -A 192.168.43.66
Starting Nmap 7.70 ( https://nmap.org ) at 2018-06-24 23:14 Taipei Standard Time
NSE: Loaded 148 scripts for scanning.
NSE: Script Pre-scanning.
Initiating NSE at 23:14
Completed NSE at 23:14, 0.00s elapsed
Initiating NSE at 23:14
Completed NSE at 23:14, 0.00s elapsed
Initiating ARP Ping Scan at 23:14
dnet: Failed to open device eth2
@jiping-s
jiping-s / rc.local
Last active January 4, 2019 12:37
/etc/rc.local
#!/bin/bash
for c in /sys/devices/system/cpu/cpu[0-9]*
do
CPU=${c#*cpu/cpu}
echo "performance" > $c/cpufreq/energy_performance_preference
echo "performance" > $c/cpufreq/scaling_governor
echo "CPU$CPU `cat $c/cpufreq/energy_performance_preference` `cat $c/cpufreq/scaling_governor`"
done