This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Twitter Batch | |
// @namespace http://jeffpalm.com/twitterbatch | |
// @description Only display twitter updates in batches of certain numbers. | |
// By default the minimum number of item required to show is | |
// 10, this can be changed via localStorage to, say, N, e.g. | |
// localStorage.setItem('batch.number',N) | |
// @include https://twitter.com | |
// @include https://www.twitter.com | |
// @include https://twitter.com/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Print out nytimes kentucky governors results | |
e.g. | |
while [[ 1 ]]; do echo; echo ; date; python ./nytimes.py; sleep 5; done | |
""" | |
import urllib, json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Shows the various sized images for an instagram image. | |
* | |
* Usage: | |
* 1. Click on an instagram thumbnail. | |
* 2. Run this. | |
*/ | |
(function() { | |
let srcset = document.querySelector('img[sizes="600px"]') | |
.getAttribute('srcset'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 6c29a9b1835c820ab0abfd5e8c9c86d399d272b5 | |
Author: Jeff Palm <jeffpalm@gmail.com> | |
Date: Sun Jan 27 14:18:03 2019 -0500 | |
Add failure callback on decoding failure | |
diff --git a/ios/RNReactNativeSharingWinstagram.m b/ios/RNReactNativeSharingWinstagram.m | |
index 1607079..03814de 100644 | |
--- a/ios/RNReactNativeSharingWinstagram.m | |
+++ b/ios/RNReactNativeSharingWinstagram.m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* This will find the full-size image urls of a smugmug.com page. | |
*/ | |
const MINIMUM_IMAGE_WIDTH = 1000; | |
/** Gets the url of the link to close a full-size image lightbox. */ | |
function getCloseLink() { | |
var els = document.getElementsByTagName('a'); | |
for (var i = 0; i < els.length; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.image.*; | |
import java.io.*; | |
import java.util.*; | |
import java.util.List; | |
import javax.swing.*; | |
import javax.imageio.ImageIO; | |
import java.net.*; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<script type="text/javascript" src="webcounter.php"></script> current viewers. | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Update every 3 seconds, may want to change this. | |
var updatePeriodMillis = 1000; | |
var lastRevs = 0; | |
var d = document.createElement('div'); | |
d.innerHTML = | |
'<div style="position: absolute; left: 150px; top: 250px; background-color: rgb(119,0,0); width: 1200px; height: ' | |
+ '800px; color: #fff; font-family: arial; right: 150px; padding: 20px;" id="reviews">' | |
+ ' <div id="numReviews" style="position: relative; font-size:6em; left: 10px; top: 10px;">--</div>' | |
+ ' <div style="margin-top:20px; position: relative; font-size:1em; left: 10px; top: 10px;">Last updated</div>' | |
+ ' <div id="lastUpdated" style="margin-top:10px; position: relative;font-size:2em; left: 10px;top: 10px;">not updated</div>' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Transforms a jar file into source and outputs source files to 'src'. | |
# Example: | |
# | |
# jar2java foo.jar ; --> source to 'src' | |
# | |
# After you can run javadoc on these files, e.g. | |
# | |
# javadoc -classpath foo.jar -d api `find src -name "*.java"` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Echos the message in a color given by the first argument. | |
# | |
# Example: | |
# | |
# % ccho red "This is red" | |
# | |
# Outputs "This is red" in red | |
# | |
# The following colors are supported | |
# red|r - RED |