Skip to content

Instantly share code, notes, and snippets.

@pope
pope / duckor.horse_cheat.js
Created April 15, 2018 04:07
duckor.horse cheat
(function() {
const btn = document.getElementById('tryagain');
const observer = new MutationObserver(() => { if (!btn.disabled) btn.click() });
observer.observe(btn, {attributes: true});
btn.click();
})();
<!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">
@pope
pope / bah.css
Created December 23, 2015 04:15
#titlecontent
{
position: absolute;
top: 100%;
transform: translateY(0)
animation: scroll 100s linear 0s infinite;
}
@keyframes scroll {
0% { transform: translateY(0); }

Keybase proof

I hereby claim:

  • I am pope on github.
  • I am shifteleven (https://keybase.io/shifteleven) on keybase.
  • I have a public key whose fingerprint is DA30 0B11 6CB0 6F0B D173 F82D 7903 1DF1 CCA5 7851

To claim this, I am signing this object:

@pope
pope / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
#!/bin/bash
declare -r SESSION_NAME=work
# If we don't have a session, then create one with the default windows.
if ! tmux has-session -t $SESSION_NAME 2>/dev/null; then
# Create a new session with the first window named "emacs". Immediately detach.
tmux new-session -d -n emacs -s $SESSION_NAME
# Create a new window named dev. Repeat this for as many new windows you like.
tmux new-window -n dev -t $SESSION_NAME
@pope
pope / gist:5494029
Created May 1, 2013 06:32
A simple script to rename the mp4s in a directory into something that Plex likes. YMMV.
for i in *.mp4; do
ffprobe "$i" 2>&1 | awk -v i="$i" '
BEGIN { FS=": " }
/title/ { title=$2 }
/artist/ { artist=$2 }
/track/ { sub(/\/12/,"",$2); track=$2 }
/album/ { sub(/^.*Pt\. /,"",$2); season=$2 }
END {
printf("mv \"%s\" \"%s - s%02de%02d - %s.mp4\"\n", i, artist, season, track, title)
}'
function profoundWisdom(str) {
str = str.replace(/\s/g, '').toLowerCase();
var r = 0;
for (var i = 0; i < str.length; i++) {
r += (str.charCodeAt(i) - 96);
}
return r;
}
@pope
pope / gist:1119056
Created August 1, 2011 21:32 — forked from 8bitorange/gist:1119051
my hello world
/**
* Handling all dom and instantiation of all other js
*
*/
// include dom
goog.require('goog.dom');
goog.require('goog.style');
goog.require('goog.iter');
{
"id": APP_ID,
"paths": ".",
"inputs": MAIN_FILE_JS,
"mode": "ADVANCED",
"level": "VERBOSE",
"checks": {
"accessControls": "WARNING",
"invalidCasts": "WARNING",
"visibility": "WARNING",