Skip to content

Instantly share code, notes, and snippets.

@jackblk
jackblk / disable-auto-update-android.md
Created Feb 10, 2022
disable auto update on android, this is for samsung phone
View disable-auto-update-android.md
  • Conected phone via USB to PC (Windows 7 64 bits). Waited a while for drivers to install.
  • Installed "minimal_adb_fastboot_v1.4.3_setup.exe" (from XDA-Developers).
  • Enabled USB DEBUG under "Config / Developer Options" on phone.
  • Connected phone to PC via USB.
  • Opened a Command Prompt under the folder "C:\Program Files (x86)\Minimal ADB and Fastboot"
  • Typed ADB SHELL, and the phone´s shell opened.
  • Then I used the following commands:
@jackblk
jackblk / firefox-geckodriver-alpine-amd64-arm64.Dockerfile
Created Dec 23, 2021
Install latest firefox and geckodriver in Docker Alpine. Headless Firefox works for both AMD64 and ARM64.
View firefox-geckodriver-alpine-amd64-arm64.Dockerfile
# ================== 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 / install-docker-on-osmc-raspberrypi.md
Last active Apr 3, 2022
Install Docker on OSMC, RaspberryPi hardware
View install-docker-on-osmc-raspberrypi.md

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 / README.md
Created Jun 2, 2021 — forked from matijs/README.md
Solarized Dark profile for macOS Terminal.app
View README.md

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 / 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
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 mouse.py for Selenium Python. See https://stackoverflow.com/a/35867777
@jackblk
jackblk / turn_off_calc_shortcut_.sh
Created Dec 27, 2020
Turn off calculator shortcut on PopOS
View turn_off_calc_shortcut_.sh
# 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 "['']"
@jackblk
jackblk / toogle_sound_port.sh
Last active Dec 25, 2020
Toogle PulseAudio output ports, disable/enable Auto-Mute Mode on Linux
View toogle_sound_port.sh
#!/bin/sh
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
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
jackblk / FeelingLucky.md
Created Oct 1, 2020
Use I'm Feeling Lucky on Chrome address bar
View FeelingLucky.md

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