Skip to content

Instantly share code, notes, and snippets.

View reacuna's full-sized avatar
🦆

Raul Acuna reacuna

🦆
  • Santiago, Chile
View GitHub Profile
{ id: 'sub_HWlmmt7y1cgiPA',
object: 'subscription',
application_fee_percent: null,
billing_cycle_anchor: 1593042184,
billing_thresholds: null,
cancel_at: null,
cancel_at_period_end: false,
canceled_at: null,
collection_method: 'charge_automatically',
created: 1593042184,
@reacuna
reacuna / identify_focus_issue.py
Created August 8, 2018 20:03 — forked from iMerica/identify_focus_issue.py
Identify which app or process is stealing focus on OSX
#!/usr/bin/python
from AppKit import NSWorkspace
import time
t = range(1,100)
for i in t:
time.sleep(3)
activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName']
print activeAppName
@reacuna
reacuna / pinpoptweets.js
Last active November 10, 2016 22:27 — forked from pbausch/pinpoptweets.js
Embed Tweets on the Pinboard Popular Page with a bookmarklet
// Bookmarklet for Pinboard
// Show tweets in popular page
// Copied from https://www.onfocus.com/2016/11/6842/pinboard-popular-tweets
javascript:(function(){var%20s=document.createElement("script");s.type="text/javascript";s.src="https://platform.twitter.com/widgets.js";s.async=true;document.head.append(s);setTimeout(function(){var%20bookmarks=document.getElementsByClassName("bookmark_title");var%20tweets=new%20Array();for(var%20i=0;i<bookmarks.length;i++){var%20burl=bookmarks[i].getAttribute("href");var%20re=new%20RegExp("status\/(\\d{15,20})");var%20e=re.exec(burl);if(e!==null){bookmarks[i].innerHTML+='<div%20id="t'+e[1]+'"%20tweetID="'+e[1]+'"%20style="width:500px;"></div>';var%20id=e[1];var%20tweet=document.getElementById('t'+id);if(!tweets.includes(e[1])){twttr.widgets.createTweet(id,tweet,{conversation:'none',cards:'visible',linkColor:'#cc0000',theme:'light'});}tweets.push(e[1]);}}},500);})();

Keybase proof

I hereby claim:

  • I am reacuna on github.
  • I am reacuna (https://keybase.io/reacuna) on keybase.
  • I have a public key whose fingerprint is 3995 3000 BB40 B134 3013 CFD3 901D 2E9B F264 BC6A

To claim this, I am signing this object:

-- save as "Add Pinboard Bookmark.scpt" in ~/Library/Scripts/Applications/Safari
-- assign it ⌘D in FastScripts to use instead of Safari's bookmarks
tell application "Safari"
set pinboardBookmarklet to "
document.location = 'http://pinboard.in/add?next=same' +
'&url=' + encodeURIComponent(location.href) +
'&title=' + encodeURIComponent(document.title);
"
do JavaScript pinboardBookmarklet in document 1
@reacuna
reacuna / gist:1233046
Created September 21, 2011 19:26 — forked from al3xandru/gist:1217265
BBEdit Maketags
-- Maketags
--
-- Builds ctags file for currently active project
--
-- Installation:
--
-- Copy script to either location:
-- ~/Library/Application Support/BBEdit/Scripts
-- ~/Dropbox/Application Support/BBEdit/Scripts
--