Skip to content

Instantly share code, notes, and snippets.

View spvkgn's full-sized avatar

spvkgn

  • Russia
View GitHub Profile
@cryzed
cryzed / fix-infinality.md
Last active September 3, 2025 06:53
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@wavezhang
wavezhang / java_download.sh
Last active September 9, 2025 01:28
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@MrYar
MrYar / Firefox-68
Last active August 25, 2025 00:21 — forked from haasn/about:config.md
Firefox telemetry and spy removal
// Turn off "Sends data to servers when leaving pages"
user_pref("beacon.enabled", false);
// Prevention of some telemetry related to the newtab
user_pref("browser.newtabpage.directory.ping", "");
user_pref("browser.newtabpage.directory.source", "");
user_pref("browser.newtabpage.enhanced", false);
// "In the release channels the Mozilla location service is used to help in figuring out regional search defaults."
// Which means sending collectable data
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active August 3, 2025 17:45
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active August 31, 2025 05:46
One Liner to Download the Latest Release from Github Repo
  • Use curl to get the JSON response for the latest release
  • Use grep to find the line containing file URL
  • Use cut and tr to extract the URL
  • Use wget to download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
@drmalex07
drmalex07 / README-setup-tunnel-as-systemd-service.md
Last active September 7, 2025 03:35
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/[email protected]. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target
@rayantony
rayantony / README.md
Last active April 8, 2017 14:50
bash-imagemagick-useful-tricks-not-hacks

ImageMagick in Bash/Console : Not all 'Tricks' necessitate using the word 'Hack' (so lets cool it on that shit ok?)

For many of these, I have created a sort of framework(s) around the standard IM commands to ease in modularization. So quickly do our Im strings vanish from memory or clumsily integrate into a million other things, I'm taking some steps to make them easy to use and share if only in a linux/ubuntu environment.

As well many of these are coded from the start to be able to take multiple file types where applicable, as well 'x' number of them via spaced command line params or selecting large groups of files with the mouse to convert which is often the objective but virtually never coded for in Linux/Bash and virtually unpublished and unpracticed in Dos/Windows. The compression isnt much mystery but this modularization and scaling of input/outputs is a common feature

@jasongardnerlv
jasongardnerlv / mybeetsconfig
Last active April 27, 2019 12:56
Tame your music collection with Beets (orig blog post)
I've finally tamed my large MP3 collection using the awesome open source utility called Beets. That, along with a few other utilities and scripts, have allowed me easily clean up my existing library, import new music, sync with my Android phone, and then playback on my computer with an extremely simple but powerful query language.
Firstly, let's talk about the parameters for which I was seeking a solution:
Command line interface - Ideally, I should be able to use the solution on any OS platform without needing more than a Bash environment and some Unix utilities. Also, with each cog in the machine being a Bash utility/script, it will make it easy to shim/pipe/redirect to other utilities to facilitate any other integrations I can dream up.
Minimal data outside of the MP3 files - I'd like as much of the MP3 data to be stored in the MP3 files themselves. A small metadata database file is ok, if it only contains duplicate information (non-volatile) and is stored with the collection, for easy backing up.
Fix M
@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active July 25, 2025 07:24
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
@2bard
2bard / mitmproxy cheat sheet
Created February 13, 2015 19:44
mitmproxy cheat sheet
Movement:
j, k down, up
h, l left, right (in some contexts)
space page down
pg up/down page up/down
arrows up, down, left, right