Skip to content

Instantly share code, notes, and snippets.

View PiciAkk's full-sized avatar
🖥️
Programming

Székely Márton PiciAkk

🖥️
Programming
View GitHub Profile
@dikiaap
dikiaap / git-io-custom-url.md
Last active June 19, 2024 01:26
git.io custom URL

Update: As of 11 January 2022, git.io no longer accepts new URLs.

Command:

curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"

URLs that can be created is from:

  • https://github.com/*
  • https://*.github.com
@heroheman
heroheman / ranger-cheatsheet.md
Last active July 8, 2024 08:16
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@ObserverOfTime
ObserverOfTime / BDLinux.md
Last active July 13, 2024 15:23
Install BetterDiscord on Linux

Install BetterDiscord on Linux

This Gist contains simple instructions on how to install, update, and uninstall BetterDiscord on Linux.

For more thorough documentation, take a look at betterdiscordctl's README.

Do NOT submit issues here as I don't check the comments. You should submit them here instead.

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@morbeo
morbeo / get_minecraft_versions.sh
Last active July 16, 2024 04:28
Get a list of Minecraft version jsons
curl -s https://launchermeta.mojang.com/mc/game/version_manifest.json | sed -E -e 's/.*("versions".*[^\]]).*/\1/g' -e 's/},/},\
/g' | awk -F\" '{print $4,$8,$20}' | column -t
id type url
17w15a snapshot https://launchermeta.mojang.com/mc/game/369f3dabee7485e12aae81e971487bac3da2d6e6/17w15a.json
17w14a snapshot https://launchermeta.mojang.com/mc/game/0536ebf96543b0a0212a89d2a97600c9f263c7bf/17w14a.json
17w13b snapshot https://launchermeta.mojang.com/mc/game/ba59e4831cfa0afc2fba4658f6d86d5599cfaa9c/17w13b.json
17w06a snapshot https://launchermeta.mojang.com/mc/game/7db0c61afa278d016cf1dae2fba0146edfbf2f8e/17w06a.json
1.11.2 release https://launchermeta.mojang.com/mc/game/12f260fc1976f6dd688a211f1a906f956344abdd/1.11.2.json
1.11.1 release https://launchermeta.mojang.com/mc/game/4fce28e8455640c8e1061f40c2be4bec4631a5ff/1.11.1.json
16w50a snapshot https://launchermeta.mojang.com/mc/game/e913d0001d077f341a5c71754ad7766c552e875e/16w50a
@gjabell
gjabell / music
Created April 3, 2017 00:46
Polybar (with music)
#!/bin/bash
player_status=$(playerctl status 2> /dev/null)
if [[ $? -eq 0 ]]; then
metadata="$(playerctl metadata artist) - $(playerctl metadata title)"
fi
# Foreground color formatting tags are optional
if [[ $player_status = "Playing" ]]; then
echo "%{F#FFFFFF}$metadata%{F-}"
@steinwaywhw
steinwaywhw / One Liner to Download the Latest Release from Github Repo.md
Last active July 17, 2024 09:19
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 \" \
@maio
maio / deaccent.clj
Created December 26, 2014 13:06
Remove accent from string using Clojure
(defn deaccent [str]
"Remove accent from string"
;; http://www.matt-reid.co.uk/blog_post.php?id=69
(let [normalized (java.text.Normalizer/normalize str java.text.Normalizer$Form/NFD)]
(clojure.string/replace normalized #"\p{InCombiningDiacriticalMarks}+" "")))
@edvind
edvind / install.sh
Last active September 9, 2021 09:46
Simple install script for Minecraft server
#!/bin/bash
# Simple install script for Minecraft server
# Version 1.2
# Written by Joel Bergroth
#
# Usage ./install.sh "/full/path/to/desired/server/location"
if [ -z "$1" ]; then
read -p "Enter full server path: " -e serverpath
@KingScooty
KingScooty / readme.md
Created November 8, 2012 12:06
Symlinking a folder from a git submodule for use in a project

#Symlink a folder from a git submodule for use in a project

I recently came across a need to try this out on a project i was working on. So here's how to do it, incase anyone else finds themselves in the same situation.

##Set up your submodule in a seperate directory.

Run this command from your project root.

git submodule add http://example.com/repo.git ./submodules/repo