Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# hosts-to-vm.sh
# Drew Reece - September 2011
#
# Made for use alongside the excellent ievms - https://github.com/xdissent/ievms
#
# Will export the local hosts (from /etc/hosts)
# to a batch file & add that batch file to a Windows VM
# The batch script will be executed to import the hosts onto the VM
#
@dhutchison
dhutchison / DropboxSync.py
Last active August 29, 2015 14:01
Python script for use with Pythonista which will sync all scripts to Dropbox. Requires a Dropbox API key. This script has moved to: https://github.com/dhutchison/PythonistaScripts
# Script to sync Pythonista files to Dropbox
# Author: David Hutchison
# www: http://www.devwithimagination.com/
# Now in the repository
# https://github.com/dhutchison/PythonistaScripts
@zamber
zamber / multipass-processing-example.xml
Last active December 17, 2015 03:59
An example of Xalan XSLT 1.0 multi-pass processing of nodes with some nice sorting options (show empty nodes last, case insensitive sort). Load it up in your favorite editor (Intellij IDEA in my case) and play with it :D.
<bookstore>
<book>
<title lang="en">everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price/>
</book>
<book>
@aeons
aeons / PoEDisplay.ahk
Last active March 26, 2016 18:19
Path of Exile item level and DPS calculations, shown in a tooltip. Cleaned up/enchanced version of this script: https://www.pathofexile.com/forum/view-thread/594346
; This script is a cleaned up and enhanced version of the one found here:
; https://www.pathofexile.com/forum/view-thread/594346
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ; Stay open in background
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
StringCaseSense, On ; Match strings with case.
; Options
; Pixels mouse must move to auto-dismiss tooltip
@wuyexiong
wuyexiong / adb-wrapper.sh
Last active December 11, 2018 04:36
This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use
#!/bin/bash
#study from here! pretty tool
#http://mitsnosrap.wordpress.com/2013/01/25/android-wrapper-for-adb/
# This is a wrapper for adb. If there are multiple devices / emulators, this script will prompt for which device to use
# Then it'll pass whatever commands to that specific device or emulator.
# Run adb devices once, in event adb hasn't been started yet
BLAH=$(adb devices)
git diff --no-prefix --ignore-space-at-eol | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" > changes.patch
@Informatic
Informatic / README.md
Last active October 4, 2020 07:01
Minimal Tor hidden service on OpenWRT
  1. Format your storage
  2. Configure networking (it's easiest with LuCI, or just take a look at OpenWRT howtos)
  3. Configure /storage by adding proper options in /etc/config/fstab, or, again, just clicking around in LuCI
  4. opkg update && opkg install tor
  5. Copy proper configuration, namely /etc/tor/torrc and /etc/config/uhttpd
  6. Reboot (or /etc/init.d/uhttpd restart && /etc/init.d/tor restart)
  7. Check /etc/tor/hidden_service/hostname for your public .onion address
  8. ...
  9. PROFIT!
@dciccale
dciccale / README.md
Last active October 22, 2021 21:52
Tiny Cross-browser DOM ready function in 111 bytes of JavaScript

DOM Ready

Tiny Cross-browser DOM ready function in 111 bytes of JavaScript.

@andreberg
andreberg / PoE-Macros.ahk
Last active June 21, 2022 18:16
[Path of Exile Autohotkey Macros] Shows how to bind some (really outdated!) commands to hotkeys. #pathofexile #poe #ahk #autohotkey #macros
#IfWinActive, Path of Exile ahk_class Direct3DWindowClass
#SingleInstance force
; Menu tooltip
Menu, tray, Tip, Path of Exile Macros
; NOTE: Adjust this path so it is correct.
; If you are using my PoE-Item-Info script you can find
; the tray icons inside its data directory.
Menu, tray, Icon, PoE Item Info\data\poe-web.ico
@mtigas
mtigas / 0-hidden-service-subdomains.md
Last active April 14, 2023 02:06
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: https://www.propublica.org/nerds/item/a-more-secure-and-anonymous-propublica-using-tor-hidden-services )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI