Skip to content

Instantly share code, notes, and snippets.

@rmateu
rmateu / amznshortener.js
Created September 22, 2011 21:47
Amazon Short URL Bookmarklet
(function(){
var id = '';
var asin = document.getElementById('ASIN');
var asin0 = document.getElementsByName('ASIN.0');
var title = document.title.replace("Amazon.com: ", "");
if (asin)
id = asin.value;
else if (asin0)
id = asin0[0].value;
@rmateu
rmateu / quix-markdown-commands
Created January 24, 2012 21:11
Quix Commands for Markdown Text Manipulation
@Text tools
@Markdown and text manipulation tools
ml javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}prompt('Markdown%20Link','['+s+']('+location+')')})();void(0) Copy selected text as Markdown link
mt javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}prompt('Markdown%20Title','['+document.title+']('+location+')')})();void(0) Copy title as Markdown link
mu javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}prompt('Markdown%20URL','('+location+')')})();void(0) URL as markdown link
mq javascript:(function(s){try{s=document.selection.createRange().text}catch(_){s=document.getSelection()}prompt('Markdown%20Copy','['+document.title+']('+location+')\n\n>'+s)})();void(0) Copy selected text as quote with title url in markdown
@rmateu
rmateu / README.md
Last active December 29, 2015 08:29 — forked from JoelBesada/README.md
Backtick command for Pinboard

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.
@rmateu
rmateu / dhcp-renew
Created November 28, 2013 22:20
.bash_profile line to renew dhcp from terminal in OSX
alias dhcp-renew='echo "add State:/Network/Interface/en0/RefreshConfiguration temporary" | sudo scutil'

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.

This is an example command for Backtick. A Backtick command consists of some executable JavaScript and a bit of metadata in JSON.

Here are the required steps to create a command:

  1. Create a new Gist with a command.js and command.json file, or simply fork this one.

  2. Write your JavaScript in command.js. This will be injected into and executed on the page the user is currently on when they run it.

  3. Add some metadata to the command.json file:

  • name: The name of the command.

Backtick.io - Save to Pinboard

Keybase proof

I hereby claim:

  • I am rmateu on github.
  • I am rmateu (https://keybase.io/rmateu) on keybase.
  • I have a public key whose fingerprint is 3710 43C3 0CDD FFE2 7859 8AD6 64F4 4F09 E2E7 D556

To claim this, I am signing this object: