Skip to content

Instantly share code, notes, and snippets.

jackblk / LogitechF310_Macbook.MD
Created Apr 13, 2021
Getting Logitech F310 to work with Macbook USB-C port
View LogitechF310_Macbook.MD

Connect & use Logitech F310 with Macbook

Since my Macbook Pro only has USB-C port, I used an USB-A to USB-C adapter to connect my F310 to it, but it does not work (pressing MODE button does not turn on the LED).

How to

To make it work:

  • Disconnect F310 from Mac
  • On F310: switch X-input to D-input
  • Hold Logitech button (in the middle)
  • Connect F310 to Mac via adapter, now you can release the Logitech button.
jackblk / mouse.gif
Last active Jan 25, 2021 — forked from primaryobjects/mouse.gif
View the mouse pointer position in Selenium Nightwatch. Execute this code when the page loads or in the javascript console. Use for Selenium Python. See
jackblk /
Created Dec 27, 2020
Turn off calculator shortcut on PopOS
# Because of whatever bug it is, even if you turn off Calculator shortcut,
# it still opens calculator in Pop OS. Run below command to disable it.
# Ref:
gsettings set calculator-static "['']"
jackblk /
Last active Dec 25, 2020
Toogle PulseAudio output ports, disable/enable Auto-Mute Mode on Linux
DEVICE='0' # Index/name of the device in `pacmd list-sinks`
CARD='1' # Card index in `cat /proc/asound/cards`
ACTIVE_SINK=$(pacmd list-sinks | grep 'active port' | awk '{ print $3 }')
if [ "$ACTIVE_SINK" = "<analog-output-headphones>" ]; then
echo "[*] Enabling all analog output on $DEVICE."
pacmd set-sink-port "$DEVICE" analog-output-lineout
amixer -c "$CARD" sset 'Auto-Mute Mode' Disabled
jackblk / .gitconfig
Last active Dec 17, 2020
Git automatically config for work email and personal email
View .gitconfig
[includeIf "gitdir/i:github/"]
path = .gitconfig-github
[includeIf "gitdir/i:work/"]
path = .gitconfig-work'
jackblk /
Created Oct 1, 2020
Use I'm Feeling Lucky on Chrome address bar


  • Navigate to chrome://settings/searchEngines?search=manage

  • Add search engine

    • Name: Feeling lucky
    • Keyword: i
    • URL:
  • Install Redirect Google to avoid Google redirect notice



Keybase proof

I hereby claim:

  • I am jackblk on github.
  • I am jackblk ( on keybase.
  • I have a public key whose fingerprint is DBD6 B206 4668 F2B4 6B4E ABDB D89E BA32 B52E 6AF0

To claim this, I am signing this object:

jackblk /
Last active Apr 9, 2021
Tutorial on how to setup a squid proxy with authentication.


This tutorial is for Ubuntu & Squid3. Use AWS, Google cloud, Digital Ocean or any services with Ubuntu to follow this tutorial.

Install squid & update

sudo apt-get update
sudo apt-get install squid3
sudo apt-get install apache2-utils