Skip to content

Instantly share code, notes, and snippets.

@dokker
dokker / meizu_video_convert.sh
Created November 25, 2011 13:18
Convert video for meizu m6 player
#!/bin/bash
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
@dokker
dokker / .vimrc
Created December 2, 2011 15:01
.vimrc
"""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""
set nocompatible
" init pathogen to include files in ~/.vim/bundle
call pathogen#infect()
" Set folding
set foldenable
@dokker
dokker / firefox and chrome cookie converter
Created January 24, 2012 10:10 — forked from dvj/firefox and chrome cookie converter
firefox and chrome cookie converter
@dokker
dokker / postgresettings.txt
Created February 22, 2012 08:12
PostgreSQL settings
add_missing_from off
allow_system_table_mods off
archive_command (disabled)
archive_mode off
archive_timeout 0
array_nulls on
authentication_timeout 1min
autovacuum on
autovacuum_analyze_scale_factor 0.1
autovacuum_analyze_threshold 50
@dokker
dokker / config
Created March 21, 2012 14:10
ncmpcpp config by Zariel
####################################################
## this is example configuration file, copy it to ##
## ~/.ncmpcpp/config and set up your preferences ##
####################################################
#
##### connection settings #####
#
## set it in order to make tag editor and renaming files work properly
#
#mpd_host = "localhost"
@dokker
dokker / slimlock-abandoned.patch
Created December 5, 2012 13:40
slimlock-abandoned
11,12c11,12
< source=(https://github.com/joelburget/slimlock/tarball/v0.11)
< md5sums=('00189f3343a99ebc578a489185e9ba1b')
---
> source=(https://github.com/joelburget/slimlock-ABANDONED/archive/master.tar.gz)
> md5sums=('319528bf2bb4b0d4c60c58e3b7d07ea7')
16c16
< cd "$srcdir/joelburget-slimlock-5d40c62"
---
> cd "$srcdir/slimlock-ABANDONED-master"
@dokker
dokker / .vimrc.after
Created June 29, 2015 07:06
.vimrc.after for Janus vim dist
"""""""""""""""""""""""""""
" General
"""""""""""""""""""""""""""
" Set zsh to shell
set shell=/usr/bin/zsh
" Set case behaviour
set ignorecase
set smartcase
@dokker
dokker / str_to_float
Last active August 29, 2015 14:23
php string to float
$str_rate = $this->settings['zones_form_'.$i.'_fee'];
$final_rate = (float)$str_rate;
$debug_arr = array(
'$str_rate' => $str_rate,
'$str_rate type' => gettype($str_rate),
'$final_rate' => $final_rate,
'$final_rate type' => gettype($final_rate),
);
print_r($debug_arr);
@dokker
dokker / .Spotify-AdKiller.log
Created November 2, 2015 13:48
spotify adkiller log
## Music path: /mnt/STORAGE/_projects ##
## Using cvlc for local playback ##
## Ad block mode: automute_simple ##
XPROP_DEBUG: WM_ICON_NAME(STRING) = "Spotify"
DBUS_DEBUG: method return time=1446471054.350589 sender=:1.119 -> destination=:1.122 serial=9 reply_serial=2
array [
dict entry(
string "mpris:artUrl"
variant string "http://open.spotify.com/thumb/48283369db65730439a355e545e92611d0f3575c"
)
@dokker
dokker / touchpad_toggle.sh
Created January 15, 2016 09:18
PS/2 Touchpad toggle
#!/bin/bash
# https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Software_toggle
declare -i ID
ID=`xinput list | grep -Eio 'touchpad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
if [ $STATE -eq 1 ]
then
xinput disable $ID