Skip to content

Instantly share code, notes, and snippets.

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

Anthony Wang anthony-wang

💭
👨‍🔬🖥
View GitHub Profile
@anthony-wang
anthony-wang / syncscroll
Created April 1, 2021 05:31 — forked from shawwn/syncscroll
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)()
@anthony-wang
anthony-wang / movie_color_bar.py
Created September 21, 2019 12:20 — forked from fanghuiz/movie_color_bar.py
Script to generate a color timeline based on video input (movie etc.) Modified from https://github.com/lint/avg-color-bar
from PIL import Image, ImageEnhance
import os
import subprocess
import sys
# Requires ffmpeg https://www.ffmpeg.org/ffmpeg.html
# Run script as
# python movie_color_bar.py input_video output_frame_folder output_image
@anthony-wang
anthony-wang / PEP8LineLengths.ipynb
Created June 7, 2019 04:26 — forked from jakevdp/PEP8LineLengths.ipynb
Further exploration of line lengths and PEP8
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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

@anthony-wang
anthony-wang / README.md
Created April 16, 2019 10:30 — forked from foosel/README.md
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
    
@anthony-wang
anthony-wang / julia_type.md
Created May 19, 2018 07:31 — forked from tshort/julia_type.md
Convert a string to a Julia type
@anthony-wang
anthony-wang / julia_type.md
Created May 19, 2018 07:31 — forked from tshort/julia_type.md
Convert a string to a Julia type
@anthony-wang
anthony-wang / software_for_scientists.md
Created March 21, 2018 08:43 — forked from stared/software_for_scientists.md
Software for scientists: community-edited list of general-purpose software for scientists.

Software for scientists

Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.

Text editors

in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.

@anthony-wang
anthony-wang / LaTeXScaleBars.md
Created July 1, 2017 17:11 — forked from rbnvrw/LaTeXScaleBars.md
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}