Skip to content

Instantly share code, notes, and snippets.

View sweinberg's full-sized avatar

swein sweinberg

View GitHub Profile
@shanselman
shanselman / gist:5422230
Last active April 10, 2025 15:49
Evil Blog Comment Spammer just exposed his template through some error and the whole thing showed up in my comments.
{
{I have|I've} been {surfing|browsing} online more than {three|3|2|4} hours today, yet I never found any interesting article like yours. {It's|It
is} pretty worth enough for me. {In my opinion|Personally|In my view}, if all {webmasters|site owners|website owners|web owners} and bloggers made good content as
you did, the {internet|net|web} will be {much more|a lot more}
useful than ever before.|
I {couldn't|could not} {resist|refrain from} commenting. {Very well|Perfectly|Well|Exceptionally well} written!|
{I will|I'll} {right away|immediately} {take hold of|grab|clutch|grasp|seize|snatch}
your {rss|rss feed} as I {can not|can't} {in finding|find|to find} your {email|e-mail} subscription {link|hyperlink} or {newsletter|e-newsletter} service. Do {you have|you've} any?
{Please|Kindly} {allow|permit|let} me {realize|recognize|understand|recognise|know} {so that|in order that} I {may just|may|could} subscribe.
Thanks.|
@ttscoff
ttscoff / gauges.rb
Created April 11, 2013 20:41
OS X CLI for gaug.es stats
#!/usr/bin/ruby
require 'rubygems'
require 'json'
require 'net/https'
class KeyChain
def initialize(user=nil)
@user ||= %x{dscl . -read /Users/$(whoami)|grep "EMailAddress:"|sed 's/^EMailAddress: //'}
@host="com.brettterpstra.gauges"
@Bren2010
Bren2010 / HearSay.md
Last active October 7, 2023 03:42
The HearSay P2P File Sharer

HearSay

The HearSay P2P File Sharer; a response to The Copyright Alert System, as well as several other internet regulation attempts. The goal of this project is to prove the viability of semi-anonymous and confidential file sharing. Consists of several proofs of concepts such as the formation of ad-hoc mix networks and routing throughout them while maintaining anonymity and semantic security.

However, lets be honest with ourselves for a second. Don't use this to fight an oppressive regime. I can not (and will not try) to 'prove' its security, and I

@ciarand
ciarand / Launch Center Pro Shortcuts.txt
Last active December 15, 2015 14:29
Some of the shortcuts I use in Launch Center Pro
Launch Center Pro URLs
----------------------
Post to App.net (via *Drafts*)
------------------------------
drafts://x-callback-url/create?text=[prompt]&action=Post%20to%20App.net&x-success=launchpro:
Search on Wikipedia (via *Chrome*)
----------------------------------
@fcrespo82
fcrespo82 / pushover.py
Created March 21, 2013 21:39
This gist describes how to send messages via push to your phone using pushover API
import requests
USER_TOKEN = u'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' #replace with your user key
APP_TOKEN = u'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' #replace with your APP token/key
HEADERS = { "Content-type": "application/x-www-form-urlencoded" }
def sendPush(message, title, url, url_title):
parameters = { u'token': APP_TOKEN,
u'user': USER_TOKEN,
@postmodern
postmodern / comment.md
Last active January 11, 2024 15:37
Crypto Privacy Copy Pasta
@jkishner
jkishner / Twitter Later
Created February 22, 2013 20:20
Twitter Later
due://x-callback-url/add?title={{drafts:///create?text=[[body]]&action=Tweet:%20SCREENNAME}}%20at%20[[title]]&x-source=Drafts&x-success=drafts://
@danielwestendorf
danielwestendorf / notify.rb
Last active February 4, 2018 16:03
Need to be notified of something immediately via telephone? Twilio/AWS/Ruby mashup to do just that
require 'twilio-ruby'
require 'aws'
# Creates a phone call using the Twilio and AWS SDK's that uses text-to-speech to play a message
# Expected to be called from the command line with the respective arguments
# Creates an XML document that is uploaded to S3. This XML document tells Twilio what to do once the call is connected
# pass your Twilio creds via environmental variables
twilio_sid = ENV['TWILIO_SID']
twilio_token = ENV['TWILIO_TOKEN']
import urllib2, urlparse, sys, webbrowser
itags = {'45': 'webm_720p',
'44': 'webm_480p',
'43': 'webm_360p',
'38': 'mp4_3072p',
'37': 'mp4_1080p',
'36': 'phone_mp4_240p',
'35': 'flv_480p',
'34': 'flv_360p',
@richardtape
richardtape / 1linenotepad.txt
Created January 30, 2013 18:15
A 1line notepad for in-browser copy and pasteyness
data:text/html;charset=utf-8, <title>TextEditor</title> <link rel="shortcut icon" href="http://g.etfv.co/https://docs.google.com"/> <style> html{height: 100%;} body{background: -webkit-linear-gradient(#f0f0f0, #fff); padding: 3%; height: 94%;} .paper { font: normal 12px/1.5 "Lucida Grande", arial, sans-serif; width: 50%; height: 80%; margin: 0 auto; padding: 6px 5px 4px 42px; position: relative; color: #444; line-height: 20px; border: 1px solid #d2d2d2; background: #fff; background: -webkit-gradient(linear, 0 0, 0 100%, from(#d9eaf3), color-stop(4%, #fff)) 0 4px; background: -webkit-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -moz-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -ms-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: -o-linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; background: linear-gradient(top, #d9eaf3 0%, #fff 8%) 0 4px; -webkit-background-size: 100% 20px; -moz-background-size: 100% 20px; -ms-background-size: 100% 20px; -o-background-size: 100% 20p