Skip to content

Instantly share code, notes, and snippets.

View rougetimelord's full-sized avatar
💯

Rouge rougetimelord

💯
View GitHub Profile

☃️ Blizzard ☃️: Delightfully simple DTN protocol

Blizzard is a delay-tolerant protocol for setting up authenticated and encrypted channels.It is designed to be used in peer-to-peer networks where peers are not necessarily online at the same time.

Unlike most other DTN protocols, it is designed to be used on resource-constrained and embedded devices like microcontrollers. This crate is no_std-compatible. However, it does require an external allocator.

The core Blizzard crate is built on top of a no_std-compatible fork of snow, a noise protocol implementation.

Features

import requests, json
from requests_oauthlib import OAuth1, OAuth1Session
from requests.auth import AuthBase, HTTPBasicAuth
class authException(Exception):
""" Auth failure """
class clientException(Exception):
""" Client failure """
class AuthHandler:
/* Defaults */
div[data-testid="tweetPhoto"]:after{
color: #fff;
margin: 0;
padding: 1rem;
text-align: center;
transition: color 0.1s ease-in, background 0.3s ease-in;
}
div[data-testid="tweetPhoto"]:hover:after{
javascript:var sell=()=>{var b=document.getElementsByClassName("inventory_iteminfo"),a=0;for(let c=0;c<b.length;c++)if(""===b[c].style.display){a=c;break}b=Number(document.getElementById("pagecontrol_cur").innerText);"none"!==document.getElementById("iteminfo"+a+"_item_market_actions").style.display?(console.log("selling"),a=100*Number(document.getElementById("iteminfo"+a+"_item_market_actions").childNodes[0].childNodes[1].innerText.replace(/(\r\n|\n|\r)/gm," ").replace(/\$/gm,"").split(" ")[2])- 2,SellCurrentSelection(),document.getElementById("market_sell_currency_input").value="$"+a/100,a=document.getElementById("market_sell_dialog_accept_ssa"),a.checked||a.click(),a=document.getElementById("market_sell_dialog_accept"),a.click(),a.click(),document.getElementById("market_sell_dialog_ok").click()):(console.log("gemming"),document.getElementById("iteminfo"+a+"_item_scrap_link").click(),setTimeout(()=>{document.getElementsByClassName("newmodal_buttons")[0].firstChild.click();setTimeout(()=> {document.getElemen

Keybase proof

I hereby claim:

  • I am rougetimelord on github.
  • I am r0uge (https://keybase.io/r0uge) on keybase.
  • I have a public key whose fingerprint is 070B 7B2A A1DE D18D 1C58 DE85 8252 FCE9 9D46 DC30

To claim this, I am signing this object:

from pathlib import Path
import os
root_dir = input("Dir: ")
for root, sub, file in os.walk(root_dir):
if "__MACOSX" in sub:
rm = os.path.join(root, "__MACOSX")
print("rming - " + rm)
os.rmdir(rm)
@rougetimelord
rougetimelord / steam_sell.js
Last active December 24, 2020 12:10
Makes selling a ton of steam trading cards easier! Use as a bookmarklet (oneline it yourself) or declare it in the tab and call it.
if(!window.sell) {window.sell=()=>{
/*Steam always has two items in the DOM, the for loop finds the one that's real*/
let items = document.getElementsByClassName('inventory_iteminfo'), index = 0;
for(let i = 0; i < items.length; i++) {
if(items[i].style.display === "") {index = i; break;}
}
let page = Number(document.getElementById('pagecontrol_cur').innerText);
/*Check if we can sell the item*/
if(document.getElementById('iteminfo' + index + '_item_market_actions').style.display !== "none") {
console.log('selling');

Keybase proof

I hereby claim:

  • I am rougetimelord on github.
  • I am r0uge (https://keybase.io/r0uge) on keybase.
  • I have a public key ASAXEU8O4Mm2xqG6EAhPKifO7yf4CWWQGjlfiVvbYOipUAo

To claim this, I am signing this object:

let evObj=document.createEvent('Events');evObj.initEvent('click',true,false);if(document.getElementById('refresh_queue_btn')==undefined){document.getElementsByClassName('btn_next_in_queue btn_next_in_queue_trigger')[0].dispatchEvent(evObj);}else{document.getElementById('refresh_queue_btn').dispatchEvent(evObj);}
console.log('You done fucked up');while(1>0){alert('You fucked up');var req = new XMLHttpRequest();req.open("GET", 'example.com', true);req.onload=function(){document.body.innerHTML=req.responseText;}req.send();setTimeout(null,Math.floor(Math.random()*1000)+1)}