Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'cgi'
require 'open-uri'
require 'rubygems'
require 'zipruby'
require 'rmagick'
SUPPORT_FORMAT = /\.(png|jpg)$/
@mofigan
mofigan / bookmarklet_megalodon.js
Created August 1, 2010 06:48
ウェブ魚拓を見る/取得するブックマークレット
javascript:
(function(){
var l=location.href;
l=prompt('URL',l);
var u='http://megalodon.jp/?url='+escape(l);
with(window.open().document){
location.href=u;
close();
}
}
@oquno
oquno / zip2mobi.rb
Created November 22, 2010 08:53
zip2mobi
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'cgi'
require 'open-uri'
require 'rubygems'
require 'zipruby'
require 'RMagick'
require 'kconv'
require 'logger'
require 'amazon/aws'
@johnholdun
johnholdun / imgur-bookmarklet.js
Created April 9, 2011 22:43
Bookmarklet for uploading the image currently loaded in your browser to imgur
// that is, navigate to the direct URL for an image hosted on the world wide web, then >>>INVOKE<<<
// i wanted the bookmarklet to redirect to the new direct image URL but that was out of scope!
javascript:void(window.location="http://api.imgur.com/2/upload.json?url="+encodeURIComponent(window.location.href));
@hansode
hansode / pararell-curl.sh
Created September 9, 2011 07:25
pararell-curl.sh
#!/bin/bash
#
# $ pararell-curl.sh --url=[url]
# $ pararell-curl.sh --url=[url] --thread=6
#
LANG=C
LC_ALL=C
set -e
@matchy256
matchy256 / rec_radiko.sh
Last active October 31, 2023 08:23 — forked from saiten/rec_radiko.sh
簡易Radiko録音スクリプト
#!/bin/bash
LANG=ja_JP.utf8
pid=$$
date=`date '+%Y-%m-%d-%H_%M'`
outdir="."
if [ $# -le 1 ]; then
@manse
manse / pixiv_favorites.php
Last active July 28, 2022 07:48
Pixivのお気に入りユーザーの新着イラストをRSSリーダーで読めるようにします。
<?php
/* ----- configure ----- */
//Pixiv ID
define('PIXIV_ID', 'your_pixiv_id');
//Pixiv password
define('PIXIV_PASSWORD', 'your_pixiv_password');
/* ----- configure ----- */
@kenjiskywalker
kenjiskywalker / nginx_ssl_server_name.md
Last active February 18, 2024 21:11
nginxのserver_nameとSSLの設定についてのメモ
@lyoshenka
lyoshenka / ddns.sh
Last active October 11, 2023 04:28 — forked from kevinoconnor7/c-ddns.sh
Quick and dirty DDNS using Bash and Cloudflare (API v4 compatible)
#!/usr/bin/env bash
# Step 1: Fill in EMAIL, TOKEN, DOMAIN and SUBDOMAIN. Your API token is here: https://dash.cloudflare.com/profile/api-tokens
# Make sure the token is the Global token, or has these permissions: #zone:read, #dns_record:read, #dns_records:edit
# If you want to set the root domain instead of a subdomain, set SUBDOMAIN to "@"
# Step 2: Create an A record on Cloudflare with the subdomain you chose
# Step 3: Run "./ddns.sh -l" to get the zone_id and rec_id of the record you created.
# Fill in ZONE_ID and REC_ID below
# This step is optional, but will save you 2 requests every time you run this script
# Step 4: Run "./ddns.sh". It should tell you that record was updated or that it didn't need updating.
@afrendeiro
afrendeiro / flac+cue2mp3.sh
Created September 15, 2013 10:39
Command-line conversion of flac+cue files to mp3 split tracks
#!/bin/sh
# Flacon-style convert to mp3 and split tracks from flac+cue files
# Made by André Rendeiro (afrendeiro@gmail.com)
# Rename
{
find . -name '* *' | while read file; do target=`echo "$file" | sed 's/ /_/g'`; mv "$file" "$target"; done
find . -name '* *' | while read file; do target=`echo "$file" | sed 's/ /_/g'`; mv "$file" "$target"; done
find . -name '* *' | while read file; do target=`echo "$file" | sed 's/ /_/g'`; mv "$file" "$target"; done