This file contains hidden or 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
git for-each-ref --count=30 --sort=-committerdate refs/heads/ --format='%(refname:short)' |
This file contains hidden or 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
var doc = document, titlesAndArtists = new Set(); | |
var scrollIntervalMs = 500; | |
var thumbsUpCount = doc.querySelector(".ProfileNav__count").textContent; | |
var scrollInterval = window.setInterval(function() { | |
if (titlesAndArtists.size < thumbsUpCount) { | |
var prevCount = titlesAndArtists.size; | |
doc.querySelectorAll(".UserProfile__ThumbUps__list .UserProfile__ThumbUps__list__item").forEach((e) => { | |
var song = doc.querySelector(".MediaListItem__primaryText", e).textContent; | |
var artist = doc.querySelector(".MediaListItem__secondaryText", e).textContent; | |
titlesAndArtists.add(song + " - " + artist); |
This file contains hidden or 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 Thingiverse Part Name Display Fixes | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Fixes some annoying things about Thingiverse | |
// @author Matt Defenthaler | |
// @match http://tampermonkey.net/index.php?version=4.5&ext=dhdg&updated=true | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js | |
// @include https://www.thingiverse.com/thing:* | |
// @grant none |
This file contains hidden or 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
#!/usr/bin/python | |
# Code for controlling a Hunter fan with a Raspberry Pi rather than the remote with FCC ID: IN2TX31 | |
# Use: python fan.py COMMAND where COMMAND is light, fan_off, fan1, fan2, fan3 | |
# Truth be told, I'm new at this radio stuff. The code below works, but the method might be a misunderstanding of the protocol/signal. I'd love to understand it better if anyone can help. | |
# Visit http://csmatt.com/notes/?p=189 for more information | |
# That said, here's my understanding: | |
# | |
# Sending a command consists of a 'part' of a command (a sequence of bits) that is made up of a preamble followed by the part's specific binary sequence |
This file contains hidden or 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
var titlesAndArtists = []; $("#track_like_pages .infobox-body").each(function(elem){ | |
titlesAndArtists.push($(this).find(".first").text() + "," + | |
$($(this).find("p.s-0.line-h-1_4>a")[0]).text()); }); | |
for(var i = 0; i < titlesAndArtists.length; i++){console.log(titlesAndArtists[i]);} |
This file contains hidden or 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
// While logged in, go to https://class.coursera.org/softwaresec-001 and select a week under Weekly Content. | |
// Run this script in the dev console and it'll put links at the top of the page that you can right-click-save-as | |
var lectLink = $("a[href^='https://class.coursera.org/softwaresec-001/lecture/view?lecture_id=']"), | |
prefix = location.pathname.split(/.*\/wiki\//)[1], | |
vidLinkContainer = $("<div id='vidLinkContainer'/>"); | |
$("#vidLinkContainer").remove(); | |
$("body").prepend(vidLinkContainer); | |
lectLink.each(function(index) { | |
var lectTitle = $(this).text(), | |
lectHref = $(this).attr("href"); |
This file contains hidden or 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 ObjdumpHandler | |
import Utils | |
objdump_functions = None | |
def get_objdump_functions(file_path): | |
global objdump_functions | |
if objdump_functions is None: |
This file contains hidden or 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
#!/usr/bin/python | |
from bowcaster.development.overflowbuilder import SectionCreator, OverflowBuffer | |
from bowcaster.common.support import LittleEndian | |
from bowcaster.payloads.mips.connectback_payload import ConnectbackPayload | |
from bowcaster.encoders.mips import MipsXorEncoder | |
qemu_libc_base=0x2aadc000 | |
badchars = ['\0','\n'] | |
SC=SectionCreator(LittleEndian, base_address=qemu_libc_base, badchars=badchars) | |
sections=[] |
This file contains hidden or 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 sys, re, serial | |
def showHelp(): | |
print "" | |
print "\t%s COM_PORT_NUMBER COMMAND" % sys.argv[0] | |
print "\t\t commands can have spaces (xb 00 70) or not (xb0070)" | |
print "" | |
def getDeviceFromStr(deviceArg): | |
# if it's just an int, we'll assume it's a windows COM port |
This file contains hidden or 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
#include <IRremote.h> | |
IRsend irsend; | |
void setup() { | |
pinMode(3, OUTPUT); | |
pinMode(13, OUTPUT); | |
Serial.begin(9600); | |
} | |
void loop() { |
NewerOlder