Skip to content

Instantly share code, notes, and snippets.

Buried in Codes

Tim Zhang ttimasdf

Buried in Codes
View GitHub Profile
evianzhow / shadowsocks-server
Last active Apr 27, 2019
shadowsocks-server OpenWRT init.d script
View shadowsocks-server
#!/bin/sh /etc/rc.common
# Copyright (C) 2016 Jian Chang <>
# Copyright (C) 2016 Evian Zhow <>
# This is free software, licensed under the GNU General Public License v3.
# See /LICENSE for more information.
nirvanatikku / css_inline_transformer.js
Created Dec 2, 2016
JavaScript CSS Inline Style Transformer (convert CSS + HTML into HTML with inline styles)
View css_inline_transformer.js
* CSS Inline Transform v0.1
* Copyright 2010-2012, Nirvana Tikku
* Dual licensed under the MIT or GPL Version 2 licenses.
* This tool leverages the jQuery library.
martinlindhe / gdb.rb
Created Jun 29, 2016 — forked from Congee/gdb.rb
For gdb to execute python3 script on OSX 10.10 or later
View gdb.rb
class UniversalBrewedPython < Requirement
satisfy { archs_for_command("python").universal? }
def message; <<-EOS.undent
A build of GDB using a brewed Python was requested, but Python is not
a universal build.
GDB requires Python to be built as a universal binary or it will fail
if attempting to debug a 32-bit binary on a 64-bit host.
View Crosstool NG 1.22, Raspberry PI
$ git clone -b 1.22
$ cd crosstool-ng
$ ./bootstrap
$ ./configure --prefix=/usr/local
$ make
$ sudo make install
$ cd ..
$ mkdir ctng
$ cd rpi1
$ ct-ng menuconfig
drmalex07 /
Last active May 8, 2021
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward


Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

Description=Setup a secure tunnel to %I
gbaman /
Last active May 6, 2021
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

zeroseis /
Created Sep 14, 2015
Disable auto start for Android File Transfer
  • Close Android File Transfer
  • Open Activity Monitor and kill “Android File Transfer Agent”
  • Go to where you installed “Android File” (I have it under /Applications)
  • Ctrl+click –> “Show package contents”
  • Go to Contents/Resources
  • Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
  • Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
meeech / gist:b2dafdb31f90160e833c
Created Jun 29, 2015
pick from whitelist of random themes for oh-my-zsh
View gist:b2dafdb31f90160e833c
#Add to your .zshrc right by ZSH_THEME
# Setup a random theme to load from a list I define
're5et' \
'sorin' \
'steeef' \
'dstufft' \
'random' \
kzu / ObservableDictionary.cs
Last active Jan 6, 2021
An ObservableDictionary<TKey, TValue>
View ObservableDictionary.cs
// Licensed by Daniel Cazzulino under the MIT License
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Diagnostics;
using System.Dynamic;
using System.Linq;
using System.Text;