Skip to content

Instantly share code, notes, and snippets.

@ProjectMoon
ProjectMoon / log
Last active September 23, 2019 12:41
AFWall Tor issue 3
==========
IPv4 Rules
==========
Chain INPUT (policy ACCEPT 18 packets, 1464 bytes)
pkts bytes target prot opt in out source destination
7362 2983K nm_mdmprxy_doze_mode_skip all -- * * 0.0.0.0/0 0.0.0.0/0
7447 3012K bw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
7447 3012K fw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
@ProjectMoon
ProjectMoon / rules
Created September 22, 2019 19:46
AFWall+ Tor Over Cellular 2
==========
IPv4 Rules
==========
Chain INPUT (policy ACCEPT 626 packets, 304K bytes)
pkts bytes target prot opt in out source destination
8061 1913K nm_mdmprxy_doze_mode_skip all -- * * 0.0.0.0/0 0.0.0.0/0
26085 13M bw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
26085 13M fw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
@ProjectMoon
ProjectMoon / log
Created September 22, 2019 11:50
AFWall+ Tor over cellular
==========
IPv4 Rules
==========
Chain INPUT (policy ACCEPT 619 packets, 95432 bytes)
pkts bytes target prot opt in out source destination
22464 26M nm_mdmprxy_doze_mode_skip all -- * * 0.0.0.0/0 0.0.0.0/0
22551 26M bw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
22551 26M fw_INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
@ProjectMoon
ProjectMoon / errorhandling.js
Created October 10, 2012 13:12
errorhandling
//A third way.
//In a business logic module. Note: replace "internal" methods with your own logic (redis, mongodb, etc).
function getBlogByGuid(id, callback) {
internalLoad(id, function(err, post) {
if (err) return callback(err);
});
}
function deleteDocumentById(id, callback) {
internalDelete(id, function(err) {
using System;
using System.Collections.Generic;
using CRBM2.Domain.Core;
using System.Linq;
using Framework.Serialization;
using CRBM2.Domain.Prepaid;
using System.Runtime.Serialization;
namespace CRBM2.Domain.Prepaid
{
[Serializable]
@ProjectMoon
ProjectMoon / Console Output
Created March 12, 2012 18:28
NPM installation issues
[node@theflux ~/stories]$ npm install
> stories@0.0.1 preinstall /home/node/stories
> rm -rf build && mkdir -p build && cd build && git clone git://github.com/ajaxorg/ace.git && cd ace && git submodule update --init --recursive
Cloning into ace...
remote: Counting objects: 22005, done.
remote: Compressing objects: 100% (6013/6013), done.
remote: Total 22005 (delta 15899), reused 20412 (delta 14467)
Receiving objects: 100% (22005/22005), 8.20 MiB | 1.47 MiB/s, done.
@ProjectMoon
ProjectMoon / debug output
Created December 1, 2011 13:04
Dante SOCKS client configuration
Dec 8 13:11:52 (1323367912.804215) rtorrent[27139]: debug: ifname2sockaddr(): no interface with the name "proxy.btguard.com" found
Dec 8 13:11:52 (1323367912.804658) rtorrent[27139]: debug: socks_rmaddr(): not freeing buffer for fd 8, issyscall
Dec 8 13:11:52 (1323367912.804799) rtorrent[27139]: debug: socks_rmaddr(): not freeing buffer for fd 8, issyscall
Dec 8 13:11:52 (1323367912.804842) rtorrent[27139]: debug: Rconnect(): socket 8, address 192.168.1.1.53
Dec 8 13:11:52 (1323367912.804882) rtorrent[27139]: debug: socks_rmaddr(): not freeing buffer for fd 8, issyscall
Dec 8 13:11:52 (1323367912.804918) rtorrent[27139]: debug: Rconnect(): doing socks_rmaddr(8) before continuing ...
Dec 8 13:11:52 (1323367912.804948) rtorrent[27139]: debug: socks_freebuffer(): socket 8
Dec 8 13:11:52 (1323367912.804989) rtorrent[27139]: debug: socks_rmaddr(): not freeing buffer for fd 8, issyscall
Dec 8 13:11:52 (1323367912.805028) rtorrent[27139]: debug: socks_rmaddr(): not freeing buffer for fd 8, issyscall
Dec 8
@ProjectMoon
ProjectMoon / README.md
Last active January 6, 2023 17:31
Patch that disables Subsonic license checking and validation

Update 2020 Edition: Use something like Airsonic instead. Subsonic's code is closed source at this point, and thus this patch is useless, unless you are using a 9 year old verison of Subsonic for some reason.


A patch to disable the licensing functionality in Subsonic, a GPL-licensed media streaming server/web interface. Use of the mobile apps requires you to get a license after 30 days of trial. You obtain a license via donation.

Except that's not a donation. So, here's a patch to fix that. Support the Subsonic project with a donation that's actually a donation. The program is developed and maintained very well.

Steps to victory

@ProjectMoon
ProjectMoon / control.jison
Created August 20, 2011 16:52
jscore lexer + grammar
/* http://www.opensource.apple.com/source/JavaScriptCore/ */
/*
Lexer defintion, gleaned from Keywords.table and Lexer.cpp
*/
%lex
%%
\s+ /* skip whitespace */
@ProjectMoon
ProjectMoon / crypt.js
Created July 20, 2011 20:12
Is there a problem with encrypting/decrypting binary files, or am I doing it wrong?
//invoke with a filename to encrypt and decrypt a specific file.
var fs = require('fs'),
crypto = require('crypto');
var ALG = 'aes256';
var KEY = 'test';
var ENCODING = 'hex';
var FILE = process.argv[2] || 'file.txt';