Skip to content

Instantly share code, notes, and snippets.

@endolith
endolith / Has weird right-to-left characters.txt
Last active July 17, 2024 12:41
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@Nurdok
Nurdok / python_conversion.md
Last active July 11, 2024 15:00
Python Conversion

Python Number Conversion Chart

From To Expression
@jehiah
jehiah / iphone_messages_dump.py
Last active September 28, 2020 03:53
Script to dump out messages to csv from an iPhone Backup sqlite file
# Copyright Jehiah Czebotar 2013
# http://jehiah.cz/
import tornado.options
import glob
import os
import sqlite3
import logging
import datetime
import csv
@remram44
remram44 / README
Last active August 6, 2017 08:48
Cygwin wrapper for Windows
Cygwin wrapper for Windows
These files are used to expose the "sh" binary to your regular Windows console.
Installation:
* Put sh.bat somewhere in your PATH (example: C:\Windows)
* Put sh_wrapper.sh where sh.bat will find it
(default: C:\cygwin\bin\sh_wrapper.sh)
If you don't use these paths, you will have to adapt the filenames in those
#!/bin/bash
VM=$1
size=`sudo lvs -o lv_size --unit=b --noheadings /dev/vg_vms/ubuntu-base-vm | sed 's/^ *//'`
echo size=$size
sudo lvcreate --size=$size --name=vms-$VM vg_vms
sudo virt-resize --expand sda1 \
/dev/vg_vms/ubuntu-base-vm /dev/vg_vms/vms-$VM
mkdir -p tmp
virsh dumpxml ubuntu-base-vm > tmp/ubuntu-base-vm.xml
@mendelgusmao
mendelgusmao / btsync
Last active March 4, 2021 15:37
init.d script for btsync (based on another script built to run dropbox)
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
@remram44
remram44 / logstack.py
Created September 13, 2013 20:43
Adds context to your stack traces
import contextlib
import linecache
import logging
import sys
import traceback
try:
import cStringIO as StringIO
except ImportError:
import StringIO
@madjar
madjar / counterexample_tpb.py
Created September 23, 2013 13:42
An attempt to find the perfect scrapper form
import re
from collections import namedtuple
import requests
from bs4 import BeautifulSoup
Torrent = namedtuple('Torrent', 'name link magnet torrent created size'
' user seeders leechers')
@rclark
rclark / Issues.md
Last active July 9, 2024 20:16
Leaflet WMS + GetFeatureInfo

There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:

  1. You have to rely on an AJAX request, this example uses jQuery
  2. To make a GetFeatureInfo request, you must provide a BBOX for a image, and the pixel coordinates for the part of the image that you want info from. A couple of squirrely lines of Leaflet code can give you that.
  3. Output formats. The info_format parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.
  4. WMS services return XML docs when there's a mistake in the request or in processing. This sends an HTTP 200, which jQuery doesn't think is an error.

Sublime Text 2 Useful Shortcuts

Tested in Mac OS X| super == command (⌘)

Open/Goto

Shortcut Action
super+t go to file
super+ctrl+p go to project