Skip to content

Instantly share code, notes, and snippets.

@pads
pads / bot.js
Created November 28, 2014 09:17
BrumJS Rock Paper Scissors Bot
var hands = [
'rock',
'paper',
'scissors',
'water',
'dynamite'
];
var opponents = []
@tahajahangir
tahajahangir / hb_test.py
Last active August 29, 2015 13:58 — forked from takeshixx/hb-test.py
Added threading/loop support (serveral features from different forks also added)
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
# Modifed to send heartbeat requests for both TLS v1.1 and v1.2
import sys
import struct
import socket
@takeshixx
takeshixx / hb-test.py
Last active November 6, 2024 06:58
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <[email protected]>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford ([email protected]).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter