Skip to content

Instantly share code, notes, and snippets.

View anthony-wang's full-sized avatar
💭
👨‍🔬🖥

Anthony Wang anthony-wang

💭
👨‍🔬🖥
View GitHub Profile
@shawwn
shawwn / syncscroll
Created April 1, 2021 03:24
Synchronized scrolling (and zooming) across browser tabs
javascript:(function()%7Bwindow.addEventListener(%20'scroll'%2C%20(e)%20%3D%3E%20%7B%20localStorage.setItem('scrollY'%2C%20scrollY)%3B%20localStorage.setItem('zoom'%2C%20document.body.style.zoom)%3B%20%7D%20)%3Bwindow.addEventListener(%20'storage'%2C%20(e)%20%3D%3E%20%7B%20if%20(e.key%20%3D%3D%3D%20%22scrollY%22)%20%7B%20y%3DparseInt(e.newValue)%3B%20window.scrollTo(0%2C%20y)%3B%20%7D%3B%20if%20(e.key%20%3D%3D%3D%20%22zoom%22)%20%7B%20document.body.style.zoom%3De.newValue%3B%20%7D%3B%20%7D%20)%7D)()
@foosel
foosel / README.md
Last active January 12, 2023 16:25
Getting the fingerprint reader of a Thinkpad x240 to work under Ubuntu 14.04

lsusb lists the fingerprint reader in the x240 as follows:

Bus 002 Device 003: ID 138a:0017 Validity Sensors, Inc.

There exists experimental driver support for this in a fork of libfprint for vfs5011 sensors, however you'll need to compile the driver yourself. To get the fingerprint sensor to work for lightdm login, su etc, follow these steps.

  1. Install fingerprint-gui:

    sudo add-apt-repository ppa:fingerprint/fingerprint-gui
    
@rbnvrw
rbnvrw / LaTeXScaleBars.md
Last active July 29, 2022 14:40
Adding scalebars to images in LaTeX

Scalebar with background

Scalebar with background

To change the backgroundcolor, adjust the scalebgcolor variable to use the desired color. Add the following code to your preamble:

\usepackage{tikz}
\usepackage[usenames, dvipsnames]{color}
\definecolor{scalebgcolor}{rgb}{0.08,0.52,0.80}
@esamattis
esamattis / unblockdns.md
Last active May 5, 2022 17:45
Transparent Netflix only region unblock with Asuswrt Merlin

Transparent Netflix only region unblock with Asuswrt Merlin

Ad-free time!, UnoTelly etc. services provide a nice way to unblock regions for Netflix and others using their custom DNS servers.

But I don't want to direct all my DNS traffic to them and I'm too lazy to manually configure all my devices (phones, tablets, media center boxes etc.). So here's how to transparently unblock Netflix for all your devices using the [Asuswrt Merlin][merlin] firmware. It's a custom router firmware which can be used on the Asus RT-N66U router for example.

Prerequisites

Enable JFFS partition and SSH login from http://<ROUTER-IP>/Advanced_System_Content.asp

@rafaeln
rafaeln / fine-tuning-ubuntu-on-x240.md
Last active April 26, 2019 20:58
Fine tuning Ubuntu on x240

Fine-tuning Ubuntu 16.04 on x240

Enabling middleclick scrolling in Ubuntu for Lenovo clickpads

With ubuntu 15.10, full clickpad support is provided by xserver-xorg-input-libinput. No further configuration needed. Tested with a T440s. (According to this)

Fine-tuning Ubuntu 14.04 on x240

@rss81
rss81 / crack.c
Last active September 9, 2018 21:40
CS50 Crack
#include <cs50.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#define _XOPEN_SOURCE
char *crypt(const char *key, const char *salt);
long long count = 0;