Skip to content

Instantly share code, notes, and snippets.

View jnozsc's full-sized avatar
🍎
Working

jnozsc

🍎
Working
  • California
View GitHub Profile
#!/bin/bash
#Linux Spotify Ad Mute v2
#Put this script in the directory the "spotify" binary is in (e.g. /usr/share/spotify).
#To open Spotify, run it instead of the "spotify" binary.
#System sound will be muted as soon as an ad plays
#Find updated versions at: http://pcworldsoftware.kilu.net/files/link_spotify-admute.php and/or https://gist.github.com/pcworld
#On Debian, you need the package "pulseaudio-utils" for the command line util "pactl" which used in this script
#
#Update: For newer 0.8.x versions (x>4; such as 0.8.8), use this script: https://gist.github.com/pcworld/3198763/#comment-813440
@jnozsc
jnozsc / xunlei_batch_downloader.user.js
Created April 29, 2011 07:58
xunlei lixian batch downloader
// ==UserScript==
// @name xunlei lixian web version batch downloader
// @author jnozsc
// @namespace https://twitter.com/jnozsc
// @description xunlei lixian web version batch downloader. modify from @sycx 's applescript http://j.mp/lZlP9g. compatible with Firefox.chrome.safari
// @include http://dynamic.cloud.vip.xunlei.com/*
// @match http://dynamic.cloud.vip.xunlei.com/*
// @version 1.1
// ==/UserScript==
@jnozsc
jnozsc / test.cpp
Created September 30, 2011 11:21
draft for piptu question
new array a[10]; // input
new array b[10]={0,0,0,0,0,0,0,0,0,0};
bool flag = true;
int c = 0;
while(flag){
flag = false;
int i;
// loop
for(i=0,i<10,i++){
int c = countNumber(b,a[i]);
@jnozsc
jnozsc / gencnipv4lst.py
Created December 24, 2011 11:19
update the chinese vpn iptable, modify from the autoddvpn svn
#!/usr/bin/env python
import urllib
import string
import math
ipv4url='http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest'
up="http://autoddvpn.googlecode.com/svn/trunk/vpnup.sh"
down="http://autoddvpn.googlecode.com/svn/trunk/vpndown.sh"
@jnozsc
jnozsc / 7mqajguknv671cuw.sh
Created May 9, 2012 12:01
some basic codes when i begin to learn rails
rails new project_name
@jnozsc
jnozsc / 03vrtrpq4ugyfgs9.sh
Created May 9, 2012 12:30
some bugs in previous version of Ruby and Rails
/usr/local/include/fuse/fuse_common.h:32:2: error: #error Please add -D_FILE_OFFSET_BITS=64 to your compile flags! In file included from /usr/local/include/fuse/fuse.h:857, from :0:
/usr/local/include/fuse/fuse_compat.h:69:24: error: sys/statfs.h: No such file or directory
@jnozsc
jnozsc / aki6jwft94oihr1z.sh
Created May 9, 2012 12:35
textmate 1.0 with blog bundle, bug with chinese
:29:in 'require': no such file to load — jcode (LoadError)
@jnozsc
jnozsc / i463j72eh6e20006.sh
Created May 12, 2012 09:55
some tips about octopuses
rake generate
@jnozsc
jnozsc / betterDoubanNavigation.user.js
Created May 17, 2012 13:02
Better Douban Navigation
// ==UserScript==
// @name Better Douban Navigation
// @author jnozsc
// @namespace http://www.douban.com/people/1563045/
// @description I need a better douban navigation
// @include http://www.douban.com/*
// @match http://www.douban.com/*
// @include http://book.douban.com/*
// @match http://book.douban.com/*
// @include http://music.douban.com/*
@jnozsc
jnozsc / NoLikeForDouban.user.js
Created June 9, 2012 07:07
remove like item from douban timeline
// ==UserScript==
// @name NoLike for douban
// @namespace jnozsc
// @description Remove Like from douban timeline
// @include http://www.douban.com/*
// @match http://www.douban.com/*
// @version 1.2
// ==/UserScript==
function main($) {