Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am amanda on github.
  • I am laika (https://keybase.io/laika) on keybase.
  • I have a public key ASDd7mhKnu1DR8dUfdQBRAyLoyfeTLswyWDTdYQBkb6Q0wo

To claim this, I am signing this object:

View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<h1>hello world</h1>
@amanda
amanda / thecloud.js
Last active Aug 29, 2015
the cloud is just
View thecloud.js
(function () {
document.body.innerHTML = document.body.innerHTML.replace(/the cloud/g, 'someone else\'s computer');
})();
// nice bookmarklet format thanks mrcoles.com
javascript:(function()%7B(function%20()%20%7Bdocument.body.innerHTML%20%3D%20document.body.innerHTML.replace(%2Fthe%20cloud%2Fg%2C%20'someone%20else%5C's%20computer')%3B%7D)()%7D)()
@amanda
amanda / geniusURL.js
Created Feb 7, 2015
bookmarklet to reload a webpage for genius.com annotation
View geniusURL.js
// bookmarklet
javascript:(function()%7B(function%20()%20%7Bvar%20geniusURL%20%3D%20%22http%3A%2F%2Fgenius.com%2F%22%20%2B%20location%3Blocation%20%3D%20geniusURL%3B%7D)()%7D)()
// readable version
(function () {
var geniusURL = "http://genius.com/" + location;
location = geniusURL;
})();
@amanda
amanda / skeleton_bot.py
Last active Aug 29, 2015
Skeleton code for Twitter bot built using Python/Twython
View skeleton_bot.py
#!/usr/bin/env python
from twython import Twython, TwythonError
import os
import time
'''twitter creds and setup'''
CONSUMER_KEY = os.getenv('CONSUMER_KEY')
CONSUMER_SECRET = os.getenv('CONSUMER_SECRET')
OAUTH_TOKEN = os.getenv('OAUTH_TOKEN')
@amanda
amanda / marqueedat.js
Last active Aug 29, 2015
Adds the "marquee" tag to either a div with the ID "content" (first version) or the first div in the DOM (second) to make the internet fun again. Use http://mrcoles.com/bookmarklet/ to convert code to a nice link!
View marqueedat.js
//bookmarklets
javascript:(function()%7B(function()%7Bvar%20h%3Ddocument.getElementById(%22content%22).innerHTML%3Bvar%20n%3D%22%3Cmarquee%3E%22%2Bh%2B%22%3C%2Fmarquee%3E%22%3Bdocument.getElementById(%22content%22).innerHTML%3Dn%3B%7D)()%7D)()
javascript:(function()%7B(function()%7Bvar%20h%3Ddocument.getElementsByTagName(%22div%22)%5B0%5D.innerHTML%3Bvar%20n%3D%22%3Cmarquee%3E%22%2Bh%2B%22%3C%2Fmarquee%3E%22%3Bdocument.getElementsByTagName(%22div%22)%5B0%5D.innerHTML%3Dn%3B%7D)()%7D)()
//pretty versions
//grabs div id="content" and marquees it
(function(){
var h=document.getElementById("content").innerHTML;
var n="<marquee>"+h+"</marquee>";