Skip to content

Instantly share code, notes, and snippets.

View sfate's full-sized avatar
🇺🇦
Glory to Ukraine, Glory to the Nation, fuck the russian federation! :feelsgood:

Oleksii Bobyriev sfate

🇺🇦
Glory to Ukraine, Glory to the Nation, fuck the russian federation! :feelsgood:
View GitHub Profile

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!");
@sfate
sfate / fromhex.bash
Created March 13, 2024 22:15 — forked from mhulse/fromhex.bash
Bash function to convert hex to 256 terminal color.
# fromhex A52A2A
# fromhex "#A52A2A"
# BLUE_VIOLET=$(fromhex "#8A2BE2")
# http://unix.stackexchange.com/a/269085/67282
function fromhex() {
hex=$1
if [[ $hex == "#"* ]]; then
hex=$(echo $1 | awk '{print substr($0,2)}')
fi
r=$(printf '0x%0.2s' "$hex")
@sfate
sfate / change-codec.md
Last active January 10, 2023 17:56 — forked from dvf/change-codec.md
Enable High Quality mode on your headphones (Updated for macOS Catalina)

If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.

Find out what codec you're using

  1. Play a song on your headphones
  2. Option (⌥) click the Bluetooth button at the top of your screen Inspect the Bluetooth Coded
  3. If you're using AAC or aptX, you can stop here—those are the highest quality codecs.

Change your codec to AAC or aptX

@sfate
sfate / GIF-Screencast-OSX.md
Created October 30, 2019 12:57 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@sfate
sfate / .gitignore
Created November 9, 2017 09:25 — forked from Corgumolax/.gitignore
.gitignore file for ruby on rails project.
#----------------------------------------------------------------------------
# Ignore these files when commiting to a git repository.
#
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# The original version of this file is found here:
# https://github.com/RailsApps/rails3-application-templates/raw/master/files/gitignore.txt
#
# Corrections? Improvements? Create a GitHub issue:
# http://github.com/RailsApps/rails3-application-templates/issues
@sfate
sfate / Vagrantfile
Created March 29, 2017 17:55 — forked from anthonysterling/Vagrantfile
Handy Vagrantfile for IE testing with Vagrant.
# Usage: IE={box} vagrant up
#
# Eg. IE=XPIE6 vagrant up
boxes = {
"XPIE6" => "http://aka.ms/vagrant-xp-ie6",
"XPIE8" => "http://aka.ms/vagrant-xp-ie8",
"VistaIE7" => "http://aka.ms/vagrant-vista-ie7",
"Win7IE8" => "http://aka.ms/vagrant-win7-ie8",
"Win7IE9" => "http://aka.ms/vagrant-win7-ie9",
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@sfate
sfate / gist:601d8b29ce06c22e5e40b581f0f8d597
Created May 18, 2016 09:36 — forked from AliMD/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@sfate
sfate / 01.js
Created August 14, 2014 19:57 — forked from martinaglv/01.js
function whatDoesItDo(val){
return val ? 1 : 2;
}