Skip to content

Instantly share code, notes, and snippets.

@oumu
oumu / gist:0afb49ccd74ecf28c47b8e1dc4c321ec
Created October 28, 2023 09:13 — forked from gaomd/gist:7da5de92561dbd0c6b44
Migrating V2EX's starred topics to Pinboard
//
// This scripts helps you migrating V2EX's starred topics to Pinboard
// https://www.v2ex.com/t/137169
//
// 0. Edit authToken variable below.
// 1. Navigate to https://www.v2ex.com/my/topics
// 2. Paste code into browser console, and enter to execute
// 3. You should see the console scroll over some outputs
// 4. Wait for the "DONE :)" message
// 5. Move to the next page, and continue step 1
(function(){var k=void 0,n=null,o;var r=this;function s(){}
function t(a){var c=typeof a;if(c=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return c;var b=Object.prototype.toString.call(a);if(b=="[object Window]")return"object";if(b=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(b=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if(c=="function"&&typeof a.call=="undefined")return"object";return c}
var u="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),aa=0;function v(a,c){function b(){}
b.prototype=c.prototype;a.v=c.prototype;a.prototype=new b}
var ba=/^[a-zA-Z0-9\-_.!~*'()]*$/;function ca(a){a=String(a);return!ba.test(a)?encodeURIComponent(a):a}
function da(a,c){for(var b=0,e=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").
@oumu
oumu / crx downloader.txt
Created October 29, 2012 14:39 — forked from yang/gist:2419515
#Bookmarklet : download Chrome extension files (CRX files) from Chrome webstore
If you want to access the source code of a Chrome extension, you need to get the .crx file. This bookmarklet downloads the .crx file for the Chrome extension you're viewing. You'll be prompted to install it; before dismissing the dialog, check in your Downloads directory. Then just unzip the .crx (it's a zip file).
javascript:window.open('https://clients2.google.com/service/update2/crx?response=redirect&x=id%3D' + /webstore\/detail\/[^\/]+\/([^\/]+)/.exec(window.location.href)[1] + '%26uc')
javascript:window.open('https://clients2.google.com/service/update2/crx?response=redirect&x=id%253D' + /webstore%5C/detail%5C/(?:%5Cw%7C-)+%5C/(%5B%5E%5C/%5D+)/.exec(window.location.href)%5B1%5D + '%2526uc')
@oumu
oumu / soundcloud-mp3.js
Created March 31, 2012 00:49 — forked from rsvp/soundcloud-mp3.js
SoundCloud bookmarklet that generates link to download MP3
/**
2012-03-26 Forked from duncanbeevers' sc-dl.js : https://gist.github.com/2157987
**/
(function(document) {
var link = document.createElement("a"),
span = document.createElement("span"),
slug = document.querySelector("#main-content-inner img[class=waveform]").src.match(/\.com\/(.+)\_/)[1],
mp3 = document.querySelector("em").innerText + ".mp3";
@oumu
oumu / utmstrip.user.js
Created March 27, 2012 10:38 — forked from paulirish/utmstrip.user.js
#userscript : Drop the UTM params from a URL when the page loads
// ==UserScript==
// @name UTM param stripper
// @author Paul Irish
// @namespace http://github.com/paulirish
// @version 1.1
// @description Drop the UTM params from a URL when the page loads.
// @extra Cuz you know they're all ugly n shit.
// @include http://*
// ==/UserScript==
@oumu
oumu / footnotify.css
Created September 18, 2011 01:31 — forked from hpeikemo/footnotify.css
Footnotify
/*
* Customize Footnotify on your site by adding custom css.
*
* This file is NOT loaded by the script and must be
* implemented on the site in order to apply.
*
* More info: https://gist.github.com/1046538
*
*/