Skip to content

Instantly share code, notes, and snippets.

@hamano
hamano / README.md
Last active December 8, 2024 02:35
unzip 6.0 日本語化パッチ(Shift_JISファイル名などに対応)
@maxim75
maxim75 / exif.html
Created May 19, 2011 06:03
Reading EXIF info from image with JavaScript
<!DOCTYPE html>
<html lang="en">
<head>
<title>h5</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script>
<script src="exif.js"></script>
<style>
#holder { border: 1px dashed #ccc; width: 100px; height: 100px; margin: 20px auto;}
#holder.hover { border: 1px dashed #333; }
#result .property { width: 100px; }
@ryanmcgrath
ryanmcgrath / JapaneseRegex.js
Last active March 22, 2025 05:58 — forked from sym3tri/JapaneseRegex.js
Regex to test for presence of Japanese characters
// REFERENCE UNICODE TABLES:
// http://www.rikai.com/library/kanjitables/kanji_codes.unicode.shtml
// http://www.tamasoft.co.jp/en/general-info/unicode.html
//
// TEST EDITOR:
// http://www.gethifi.com/tools/regex
//
// UNICODE RANGE : DESCRIPTION
//
// 3000-303F : punctuation
@terrancesnyder
terrancesnyder / regex-japanese.txt
Created November 7, 2011 14:05
Regex for Japanese
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
([一-龯])
Regex for matching Hirgana or Katakana
([ぁ-んァ-ン])
Regex for matching Non-Hirgana or Non-Katakana
([^ぁ-んァ-ン])
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
@eagletmt
eagletmt / tombloo.service.extractors.Danbooru.js
Created December 23, 2011 13:44
Tombloo extractor for Danbooru
(function() {
Tombloo.Service.extractors.register({
name : 'Photo - Danbooru',
ICON : 'http://danbooru.donmai.us/favicon.ico',
URL : 'http://danbooru.donmai.us/',
check : function(ctx) {
const DANBOORU_LIKE_SITES = [
'://danbooru.donmai.us/post/show/',
'://yande.re/post/show/',
'://konachan.com/post/show/',
<?php
function rgicgier_pagination($query = null) {
if ( !$query ) {
global $wp_query;
$query = $wp_query;
}
$big = 999999999; // need an unlikely integer
$pagination = paginate_links( array(
@hubgit
hubgit / README.md
Last active August 4, 2026 14:23
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@Jach
Jach / show_retweets.py
Created September 25, 2014 04:47
Print out all the retweets you made. Download your twitter data backup, go into the data/js/tweets folder and run this script.
import json
import glob
files = glob.glob('*.js')
data = {}
for f in files:
file = open(f)
_ = file.readline()
data[f] = json.loads(file.read())
@loleg
loleg / grab-commons-images-sh
Last active April 7, 2026 12:08
Download images and metadata from a Wikimedia Commons category or results page
#!/bin/bash
#
# Download images from a Wikimedia Commons category
#
# Highest preview resolution and metadata in XML format will be saved in subfolders.
# Usage: execute this script on a Linux command line, providing the full URL to the category page.
#
# Shell tools required for this script: wget sed grep
#
@dyjjones
dyjjones / torrent.py
Created July 6, 2015 03:56
download torrent files
import urllib2
import json
from sys import argv
from bs4 import BeautifulSoup
import StringIO
import gzip
import sh
import zlib
url = "http://metasearch.torrentproject.com/torrenttojson4.php?site=kat.cr&search={}&output=json".format('%20'.join(argv[1:]))