Skip to content

Instantly share code, notes, and snippets.

View larvata's full-sized avatar

Larvata larvata

View GitHub Profile
@larvata
larvata / tampermonkey-itunes-large-cover.js
Last active May 25, 2016 20:20
this is a Tampermonkey script for itunes.click album cover for download it as 1200x1200 resulotion.
View tampermonkey-itunes-large-cover.js
// ==UserScript==
// @name itunes Large Cover
// @namespace https://github.com/larvata
// @version 0.1
// @description click album cover for download it as 1200x1200 resulotion.
// @match https://itunes.apple.com/*/album/*
// @copyright 2013+, Larvata
// ==/UserScript==
var artworks=document.getElementsByClassName('artwork');
@larvata
larvata / JUST-DICE.js
Last active May 25, 2016 20:20
auto script for just-dice
View JUST-DICE.js
// ==UserScript==
// @name JUST-DICE
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match https://just-dice.com/*
// @copyright 2012+, You
// ==/UserScript==
///////// CONST /////////
@larvata
larvata / JUST-DICE-2.js
Last active June 24, 2017 03:29
auto script for just-dice with new feature
View JUST-DICE-2.js
// ==UserScript==
// @name JUST-DICE
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match https://just-dice.com/*
// @copyright 2012+, You
// ==/UserScript==
///////// CONST /////////
@larvata
larvata / bit-dice.js
Last active May 25, 2016 20:18
auto script for btc-dice
View bit-dice.js
// ==UserScript==
// @name BTC-DICE
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://www.btc-dice.com/*
// @copyright 2012+, You
// ==/UserScript==
///////// CONST /////////
@larvata
larvata / tampermonkey-oricon-large-cover.js
Last active May 25, 2016 20:18
oricon Large Cover download
View tampermonkey-oricon-large-cover.js
// ==UserScript==
// @name oricon Large Cover
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://www.oricon.co.jp/rank/*
// @copyright 2012+, You
// ==/UserScript==
$.each($(".item_img>div:first-child>a"),function(i,obj){
@larvata
larvata / ConfigurationWrapper.cs
Created December 9, 2014 08:50
Common ConfigurationManager for app.config and web.config
View ConfigurationWrapper.cs
using System.Collections.Specialized;
using System.Configuration;
using System.Reflection;
using System.Web.Configuration;
namespace TinyMess.Common
{
internal static class ConfigurationManagerWrapper
{
private static bool IsAspDotNet { get; set; }
@larvata
larvata / BuffWalker.cs
Created January 13, 2015 02:36
A binary reader
View BuffWalker.cs
public class BuffWalker
{
public byte[] Buffer;
private uint _positon;
public EndiannessEnum Endianness { get; set; }
public long RestBytesCount
{
get { return this.Buffer.LongLength - _positon; }
}
@larvata
larvata / shadowsocks-quota
Last active October 14, 2023 16:06
shadowsocks bandwidth limit and data quota each port
View shadowsocks-quota
# draft
# view current data quota
sudo iptables -nvL -t filter --line-numbers
# init
sudo iptables -I OUTPUT -p tcp --sport <target-port> -m quota --quota <quota-bytes> -j ACCEPT
sudo iptables -I OUTPUT -p tcp --sport <target-port> -j DROP
# reset quota
@larvata
larvata / tampermonkey-google-plus-full-image.js
Last active January 31, 2017 09:34
google plus full size image
View tampermonkey-google-plus-full-image.js
// ==UserScript==
// @name google plus full size image
// @namespace http://larvata.me/
// @version 0.1
// @description enter something useful
// @author Larvata
// @match *://*.googleusercontent.com/*
// @grant none
// ==/UserScript==
@larvata
larvata / tampermonkey-twitter-full-image.js
Last active March 15, 2018 07:27
twitter full size image
View tampermonkey-twitter-full-image.js
// ==UserScript==
// @name twitter full size image
// @namespace https://github.com/larvata
// @version 0.3
// @description always get the hi-res image from twitter
// @author Larvata
// @match https://pbs.twimg.com/*
// @grant none
// @license MIT
// ==/UserScript==