Skip to content

Instantly share code, notes, and snippets.

View quininer's full-sized avatar
®️
Work with Rust.

quininer quininer

®️
Work with Rust.
View GitHub Profile
@wataf1
wataf1 / userChrome.css
Created March 24, 2018 02:04
my custom firefox
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Please forgive my shitty css, I'm not a web dev
Links:
https://www.reddit.com/r/FirefoxCSS/
For live debug: ctrl+alt+shift+i, grant remote permission, StyleEditor > userChrome.css
https://www.reddit.com/r/FirefoxCSS/comments/73dvty/tutorial_how_to_create_and_livedebug_userchromecss/
https://github.com/Timvde/UserChrome-Tweaks/blob/master/tabs/hide-tabs-windows.css
https://www.howtogeek.com/334716/how-to-customize-firefoxs-user-interface-with-userchrome.css/
// Suppose you have a variable named `future` which implements the `Future` trait.
let future: impl Future = ...;
// This gist demonstrates how to run the future until completion using the `stdweb` crate.
// The various imports.
extern crate futures;
extern crate stdweb;
@danielrw7
danielrw7 / replify
Last active October 24, 2023 12:03
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "%s> " "$command"
# Maintainer: CUI Hao <cuihao.leo@gmail.com>
pkgname=toxvpn-git
pkgver=20150710
pkgrel=1
pkgdesc="toxvpn is a powerful tool that allows one to make tunneled point to point connections over Tox."
arch=(i686 x86_64)
url=https://github.com/cleverca22/toxvpn
license=(GPL3)
depends=(tox)
@felipeota
felipeota / gist:afb5f510f5b315f8bed8
Created March 23, 2015 03:11
Multitouch on Surface Pro 3 TypeCover for kernel 3.19, 4.0
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 56ce8c2..5a80896 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -705,9 +705,8 @@ static void hid_scan_collection(struct hid_parser *parser, unsigned type)
hid->group = HID_GROUP_SENSOR_HUB;
if (hid->vendor == USB_VENDOR_ID_MICROSOFT &&
- (hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3 ||
- hid->product == USB_DEVICE_ID_MS_TYPE_COVER_3_JP) &&
@farseerfc
farseerfc / swapview.d
Created January 7, 2015 06:00
D version swapview
#!/usr/bin/dmd -run
import std.stdio, std.file, std.path, std.string, std.conv, std.math, std.container, std.algorithm;
string filesize(double size){
string units = "KMGT";
double left = size.fabs();
int unit = -1;
while(left > 1100 && unit < 3){
@karlgluck
karlgluck / Hash Ladders for Shorter Lamport Signatures.md
Last active March 31, 2024 17:53
I describe a method for making Lamport signatures take up less space. I haven't seen anyone use hash chains this way before, so I think it's pretty cool.

What's this all about?

Digital cryptography! This is a subject I've been interested in since taking a class with Prof. Fred Schneider back in college. Articles pop up on Hacker News fairly often that pique my interest and this technique is the result of one of them.

Specifically, this is about Lamport signatures. There are many signature algorithms (ECDSA and RSA are the most commonly used) but Lamport signatures are unique because they are formed using a hash function. Many cryptographers believe that this makes them resistant to attacks made possible by quantum computers.

How does a Lamport Signature work?