Skip to content

Instantly share code, notes, and snippets.

@nk23x
nk23x / soundcloud-flash.html
Created December 22, 2014 16:40
p1.soundcloud.com - url
<iframe src="http://p1.soundcloud.com/player.swf?referer=&url=https%3A%2F%2Fsoundcloud.com%2Fnok%2Fsets%2Fmixes-techno&color=eeeeee&theme_color=f1f1f1&download=false&auto_play=false&show_artwork=false&show_comments=false&show_playcount=false&show_bpm=false&default_height=400&default_width=390"></iframe>
@nk23x
nk23x / apache-tips.txt
Created January 9, 2015 14:41
apache config tips
== # Apache Internal Dummy Connection - what is it and what should I do with it? ==
If you wish to exclude apache dummy connections from your log:
SetEnvIf Remote_Addr "83\.170\.93\.77" loopbackaccess
CustomLog logs/access_log combined env=!loopbackaccess
== # ProxyPassMatch ==
ProxyPassMatch is available, which lets you specify a pattern (Regular Expression) for your forwarding - for example, if you wanted to forward all you image requests to an image server:
@nk23x
nk23x / vmware-tools (get + install)
Created February 13, 2015 15:07
scripting in progress
vmtoolsd -v|perl -pe 's/([a-zA-Z-,()])//g;s/\s+([0-9.\s].*)/$1/g;s/([0-9.].?)([0-9.].?)([0-9.].?)([0-9.].+) (.*)/VMwareTools-$1$2$3-$5.tar.gz/g;'
= VMwareTools-9.4.11-2400950.tar.gz
if [ "$(wget -q -O - http://[your filehost]/[path]/VMwareTools-LATEST)" ne "$(vmtoolsd -v|perl -pe 's/([a-zA-Z-,()])//g;s/\s+([0-9.\s].*)/$1/g;s/([0-9.].?)([0-9.].?)([0-9.].?)([0-9.].+) (.*)/VMwareTools-$1$2$3-$5.tar.gz/g;')" ]
then
cd /tmp/
wget -q http://[your filehost]/[path]/$(wget -q -O - http://[your filehost]/[path]/VMwareTools-LATEST)
tar xvzf VMwareTools-*.tar.gz
@nk23x
nk23x / mobilism_get_latest_uploads.sh
Last active August 29, 2015 14:15
mobilism checker
( date; echo "<br><ul>"; \
(for i in 40 80 120 160 200 240 280 320 360 400 440 480 520 560 600; \
do wget -O - -q "http://mobilism.me/search.php?keywords=File+Size&terms=all&author=&fid%5B%5D=1283&fid%5B%5D=424&fid%5B%5D=434&fid%5B%5D=422&fid%5B%5D=423&fid%5B%5D=428&fid%5B%5D=429&fid%5B%5D=1288&fid%5B%5D=1332&fid%5B%5D=432&fid%5B%5D=427&fid%5B%5D=435&fid%5B%5D=436&fid%5B%5D=437&fid%5B%5D=1336&fid%5B%5D=438&fid%5B%5D=442&fid%5B%5D=443&fid%5B%5D=444&fid%5B%5D=123&fid%5B%5D=124&fid%5B%5D=311&fid%5B%5D=1284&fid%5B%5D=97&fid%5B%5D=98&fid%5B%5D=100&sc=1&sf=firstpost&sr=topics&sk=t&sd=d&st=1&ch=0&t=0&submit=Search&start=$i"; done) \
| grep topictitle \
| perl -pe 's/.\/viewtopic.php/http:\/\/mobilism.me\/viewtopic.php/g;s/<a/<li><a/g;s/ <br \/>/<\/li>/g;s/^(.*)<li>/<li>/g;'; \
echo "</ul>";) >/tmp/t.html
@nk23x
nk23x / latest_apk_list_to_html
Created February 28, 2015 00:02
AppWererabbit export_app_list/app_list.csv to html
(echo -e "<html>\n<body>\n\n<ul>"; \
cat export_app_list/latest_*/app_list.csv \
| grep -v 'Created by AppWererabbit' \
| sort -d \
| perl -pe 's/\"(.*)\",\"(.*)\"/ <li>\n <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=$1\">\n $2 ($1)\n <\/a>\n <\/li>/g;'; \
echo -e "</ul>\n\n</body>\n</html>") \
| grep -v 'version=' \
> /tmp/apps.html
<!--
start parsing at
{"81":[
stop parsing at
,"1018":[
oscillator(s) and their frequencies in hz
1 whitenoise 63.99999999978596405600
2 pinknoise 63.99999999978596405600
3 brownnoise 63.99999999978596405600
4 sine 63.99999999978596405600
5 sine 255.99999999743156867232
6 sine 1023.99999998287712448384
7 square 63.99999999978596405600
8 square 255.99999999743156867232
@nk23x
nk23x / process
Last active January 26, 2017 18:07 — forked from coderofsalvation/process
SOX: PROCESS
#
# soxmasteraudio electribe configuration file
#
[[ ! -n $CLIP ]] && CLIP="3"
# init fx
LIMIT="ladspa tap_limiter.so "tap_limiter" "-"$CLIP 0.0"
SOXREVERB="reverb 20 50 100 50 60 -3" # reverb %,HF-damping %,roomscale %, stereodepth %, pre-delay ms, wet-gain db
[[ -f /usr/lib/ladspa ]] && export LADSPA_PATH="/usr/lib/ladspa"
[[ ! -f /usr/lib/ladspa/transient_1206.so ]] && echo "please download steve Harris's pluginpack (hint: apt-get install swh-plugins)" && exit
@nk23x
nk23x / downsample.bash
Last active January 26, 2017 18:06 — forked from coderofsalvation/downsample.bash
SOX: DOWNSAMPLE
#!/bin/bash
[[ ! -n "$1" ]] && {
echo "Usage: ./downsample <input.wav> <output.wav> "
echo " DOWNSAMPLE=6 MONO=1 ./downsample in.wav out.wav ";
echo " TREBLE=3 RATE=22500 DOWNSAMPLE=4 GAIN=1 ./downsample in.wav out.wav ";
exit
}
calc(){
echo "$1" | bc -l
@nk23x
nk23x / loopcrossfade.sh
Last active May 6, 2020 16:09 — forked from coderofsalvation/loopcrossfade
SOX: CROSSFADE LOOP
# makes a audiofile to loop itself (seamless by using a crossfade trick) (needs sox audio utilities)
# @dependancy sox
# Usage: ./loopcrossfade <input.wav> <faderatio> [outputdir]
#
loopcrossfade(){
input="$1"; faderatio="$2"; outputdir="$3"; tmpinput="/tmp/$(basename "$input").loopcrossfade.wav"
[[ ! -f "$input" ]] && echo "cannot find $1" && exit 1
valid=$(echo "$faderatio > 1.99" | bc -l );
(( $valid == 0 )) && echo "faderatio should be 2.0 or bigger" && exit 1