Skip to content

Instantly share code, notes, and snippets.

@jackblk
jackblk / LogitechF310_Macbook.MD
Created April 13, 2021 16:07
Getting Logitech F310 to work with Macbook USB-C port

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
jackblk / squid_proxy_tutorial.md
Last active December 8, 2024 03:28
Tutorial on how to setup a squid proxy with authentication.

Note

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
@jackblk
jackblk / disable-auto-update-android.md
Last active September 28, 2024 14:29
disable auto update on android, this is for samsung phone

This guide is for Windows.

  • Connect phone via USB to PC, wait a while for drivers to install.
  • Install "Minimal ADB Fastboot" (from XDA-Developers).
  • Enable USB DEBUG under "Config / Developer Options" on phone.
  • Open a Command Prompt under the folder "C:\Program Files (x86)\Minimal ADB and Fastboot"
  • Open phone adb shell: adb shell
  • Use the following commands:
@jackblk
jackblk / FeelingLucky.md
Created October 1, 2020 04:17
Use I'm Feeling Lucky on Chrome address bar

Setup

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

  • Add search engine

    • Name: Feeling lucky
    • Keyword: i
    • URL: http://www.google.com/search?q=%s&btnI=Im+Feeling+Lucky
  • Install Redirect Google to avoid Google redirect notice

Usage

@jackblk
jackblk / .gitconfig
Last active February 10, 2024 17:47
Git automatically config for work email and personal email
[includeIf "gitdir/i:github/"]
path = .gitconfig-github
[includeIf "gitdir/i:work/"]
path = .gitconfig-work'
@jackblk
jackblk / install-docker-on-osmc-raspberrypi.md
Last active April 3, 2022 13:11
Install Docker on OSMC, RaspberryPi hardware

Intro

Install Docker for OSMC on Raspberry Pi.

Tested on Raspberry Pi 2B, OSMC 2020.11-1.

Install

Basic checks

Check version, release and keyname of OS:

@jackblk
jackblk / firefox-geckodriver-alpine-amd64-arm64.Dockerfile
Created December 23, 2021 09:56
Install latest firefox and geckodriver in Docker Alpine. Headless Firefox works for both AMD64 and ARM64.
# ================== Install Firefox & Driver ==================
RUN apk add --no-cache firefox-esr
# Install Geckodriver
SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
RUN apk add --no-cache --virtual .build-deps wget \
&& GECKODRIVER_VERSION=$(wget -qO- https://api.github.com/repos/mozilla/geckodriver/releases/latest \
| grep "tag_name" | sed -E 's/.*"([^"]+)".*/\1/') \
&& wget -qO /tmp/geckodriver.tar.gz \
"https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz" \
@jackblk
jackblk / README.md
Created June 2, 2021 07:19 — forked from matijs/README.md
Solarized Dark profile for macOS Terminal.app

Solarized Dark profile for Terminal.app on macOS High Sierra

Based on the excellent Solarized (Dark) created by Ethan Schoonover. For source code, check the main Solarized repository on GitHub.

Installation

Open and save Solarized Dark.terminal.

Import from the “Profiles” tab in the settings of Terminal.app or just double-click the file after downloading.

@jackblk
jackblk / mouse.gif
Last active January 25, 2021 07:57 — 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 mouse.py for Selenium Python. See https://stackoverflow.com/a/35867777
mouse.gif
@jackblk
jackblk / turn_off_calc_shortcut_.sh
Created December 27, 2020 08:25
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: https://www.reddit.com/r/pop_os/comments/idey8l/cant_turn_off_calculator_shortcut/
gsettings set org.gnome.settings-daemon.plugins.media-keys calculator-static "['']"