Skip to content

Instantly share code, notes, and snippets.

View searge's full-sized avatar
🦄
Servering servers

Sergij Boremchuk searge

🦄
Servering servers
View GitHub Profile
@FalcoSuessgott
FalcoSuessgott / .gitconfig
Last active January 11, 2022 14:47
List all branches and there last commits (Git alias)
...
[alias]
# https://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
br = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
import sys
from functools import reduce
N = 4
VARS = 'abcd'
mult = lambda a, b: a * b
def showN(i):
if i == 1:
@luxplanjay
luxplanjay / visually-hidden.css
Last active May 2, 2026 16:47
Visually hidden CSS pattern
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
border: 0;
padding: 0;
white-space: nowrap;
clip-path: inset(100%);
@junagao
junagao / vscode-italic-font-settings.md
Last active February 2, 2026 03:57
VSCode italic font settings

VSCode italic font settings

Add this to settings.json (cmd ,):

{
  "editor.fontFamily": "Operator Mono, Fira Code iScript, Menlo, Monaco, 'Courier New', monospace",
  "editor.fontLigatures": true,
  "editor.tokenColorCustomizations": {
    "textMateRules": [
      {
@cb372
cb372 / riscv.md
Last active January 2, 2026 13:48
Writing an OS in Rust to run on RISC-V

(This is a translation of the original article in Japanese by moratorium08.)

(UPDATE (22/3/2019): Added some corrections provided by the original author.)

Writing your own OS to run on a handmade CPU is a pretty ambitious project, but I've managed to get it working pretty well so I'm going to write some notes about how I did it.

@khssnv
khssnv / shell_oneliners.md
Last active April 18, 2023 04:19
Usefull shell commands what fits one line

Color golang test output

go test -v ./tests | sed ''/PASS/s//$(printf "\033[32mPASS\033[0m")/'' | sed ''/FAIL/s//$(printf "\033[31mFAIL\033[0m")/''

Backup your user home data excluding some files

cd ~
tar -cvpzf backup.tar.gz --exclude=./backup.tar.gz --exclude=./.local/share/io.parity.ethereum/chains/ --one-file-system .
@searge
searge / exchange.py
Last active October 9, 2018 15:44
Python Snippets
'''
Pythonic way of
VALUE SNAPPING
'''
a, b = 5, 10
print(a, b)
a, b = b, a
print(a, b)
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 15, 2026 21:46
set -e, -u, -o, -x pipefail explanation
@loganvolkers
loganvolkers / Byte Formatting for Google Sheets.md
Last active February 26, 2026 06:53
Byte formatting for Google Sheets
@dylanmckay
dylanmckay / facebook-contact-info-summary.rb
Last active July 3, 2025 21:22
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# NOTE: Requires Ruby 2.1 or greater.
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created