Skip to content

Instantly share code, notes, and snippets.

@fpcMotif
fpcMotif / springer-lnm-1.md
Created January 16, 2016 15:11 — forked from akalin/springer-lnm-1.md
Direct links to Lecture Notes in Mathematics full books

Direct links to Lecture Notes in Mathematics (Part 1)

*-Autonomous Categories - Michael Barr (1979) ([1], [2], [3], [4], [5], [6])

1-Dimensional Cohen-Macaulay Rings - Eben Matlis (1973) ([1], [2

@bishboria
bishboria / LittleLang.agda
Last active January 17, 2016 16:15
How do I fix the 'cannot decide' error in the opt function?
module LittleLang where
open import Data.Bool
open import Data.Nat
data type : Set where
tNat tBool : type
data exp : type → Set where
nat : ℕ → exp tNat
@henrik
henrik / bookmarklet.js
Last active August 28, 2016 08:22
Bookmarklet to enable saving full-size(?) images from Houzz.com.
// When triggered, adds a small image before other images that represents the full-size image.
// Drag-and-drop it, right-click and save, or click to open.
javascript:$("img.viewImage, img.currentImage, img.space, img[id^=galleryImg], img[class^=browseListImage], .gallery-photo img").each(function() { var newSrc = this.src.replace(/[fs]images\/(\d+).*/, 'simages/$1_0_9-.jpg'); $(this).parents("a").andSelf().first().before("<a href='"+newSrc+"'><img src='"+newSrc+"' width=50></a>") })
@fpcMotif
fpcMotif / bookmarklet.js
Created August 28, 2016 08:22 — forked from henrik/bookmarklet.js
Bookmarklet to enable saving full-size(?) images from Houzz.com.
// When triggered, adds a small image before other images that represents the full-size image.
// Drag-and-drop it, right-click and save, or click to open.
javascript:$("img.viewImage, img.currentImage, img.space, img[id^=galleryImg], img[class^=browseListImage], .gallery-photo img").each(function() { var newSrc = this.src.replace(/[fs]images\/(\d+).*/, 'simages/$1_0_9-.jpg'); $(this).parents("a").andSelf().first().before("<a href='"+newSrc+"'><img src='"+newSrc+"' width=50></a>") })
@yichao0319
yichao0319 / feed43:ck101
Last active September 28, 2016 03:14
feed43:卡提諾
<li class="cartoon-img">{*}<a href="{%}" title="{%}">{*}<img src="{%}" title="{*}" alt="{*}" src="{*}" alt="Bad Image" onError="this.src='{*}';"/>{*}</a>{*}<h6><a target="_blank" href="{*}" title="{*}"><strong>{*}</strong></a></h6>{*}<p>{*}<em>{*}</em></p>{*}</li>
@miklb
miklb / gist:8536fdb43ed8564689cb
Last active December 1, 2016 04:50
bookmarklet to hide "IFTTT" from a page. (specifically pinboard). Completely cribbed from this [Stack Overflow](https://gist.github.com/miklb/8536fdb43ed8564689cb/edit) solution.
javascript:function htmlreplace(a,b,element){if(!element)element=document.body;var nodes=element.childNodes;for(var n=0;n<nodes.length;n++){if(nodes[n].nodeType==Node.TEXT_NODE){nodes[n].textContent=nodes[n].textContent.replace(new RegExp(a,'gi'),b);}else{htmlreplace(a,b,nodes[n]);}}}htmlreplace('IFTTT','');
> binom.test(2, 12)
Exact binomial test
data: 2 and 12
number of successes = 2, number of trials = 12, p-value = 0.03857
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.02086253 0.48413775
sample estimates:
@fpcMotif
fpcMotif / com.tjluoma.IgnitionAtWork.plist
Created December 21, 2016 08:51 — forked from tjluoma/com.tjluoma.IgnitionAtWork.plist
Save this to ~/Library/LaunchAgents/com.tjluoma.ignitiononoroffatwork.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.tjluoma.IgnitionAtWork</string>
<key>Program</key>
<string>/usr/local/bin/IgnitionAtWork.sh</string>
<key>QueueDirectories</key>
<array>
@ChewingPencils
ChewingPencils / Drafts: Search Tweetbot (No Retweets)
Created January 24, 2013 13:29
-filter:retweet -"RT " lang:en
drafts://x-callback-url/import_action?type=URL&name=Search%20Tweetbox&url=tweetbot%3A%2F%2F%2Fsearch%3Fquery%3D%5B%5Bdraft%5D%5D%2520lang%253Aen%2520-filter%253Aretweet%2520-%2522RT%2520%2522
@jacobsalmela
jacobsalmela / sortDropboxPhotos.sh
Created May 10, 2015 20:09
Sort Dropbox Camera Uploads by EXIF location
#!/bin/bash
apiKey="abcD12345efGhIJkLmn-abcD12345efGhIJkLmn_cO_8"
filename=$(basename "$1")
filename="${filename%.*}"
directoryname=$(dirname "$1")
latitude=$(mdls "$1" | awk '/Latitude/ {print $3}')
longitude=$(mdls "$1" | awk '/Longitude/ {print $3}')
data=$(curl -s https://maps.googleapis.com/maps/api/geocode/json?latlng="$latitude","$longitude"&key="$apiKey")
city=$(echo "$data" | grep "formatted_address" | head -1 | cut -d',' -f2 | sed -e 's/^[ \t]*//')
case "$city" in