Skip to content

Instantly share code, notes, and snippets.

View antonydevanchi's full-sized avatar
💭
I may be slow to respond.

Anton Piskunov antonydevanchi

💭
I may be slow to respond.
View GitHub Profile
#!/bin/bash
# Check if the database path is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 /path/to/your/database.sqlite"
exit 1
fi
# Use the first argument as the database file path
DB_PATH="$1"
@RubenKelevra
RubenKelevra / fast_firefox.md
Last active April 7, 2025 12:42
Make Firefox fast again
@gopsmith
gopsmith / DisableBigSurMonterey.sh
Last active January 10, 2025 05:37 — forked from b0gdanw/DisableBigSur.sh
Disable Big Sur and Monterey services
#!/bin/zsh
# CREDITS: Original idea and script disable.sh by pwnsdx https://gist.github.com/pwnsdx/d87b034c4c0210b988040ad2f85a68d3
# Big Sur revision by b0gdanw https://gist.github.com/b0gdanw/40d000342dd1ba4d892ad0bdf03ae6ea
# TEMPORARILY disabling (e.g. STOPPING via 'bootout') unwanted services on macOS 11 Big Sur and macOS 12 Monterey:
# This version is for a special boot that optimizes for real-time music performance and streaming video.
# Due to the read-only system volume introduced with macOS Catalina, this script can NOT be run in Recovery mode's Terminal.
# For my purposes I leave WiFi enabled, for streaming video to a local router with no internet connection.
#!/bin/bash
#
# 実行方法
#
# Mac のターミナルで以下を入力して実行
# sh -c "$(curl -fsSL https://gist.github.com/blendthink/5ca7dd072db6b0ebe5af8189d2cc5aad/raw)"
#
# 公式のドキュメントは以下
# https://developer.apple.com/documentation/technologies
@vishalkanaujia
vishalkanaujia / common-apps.sh
Last active August 31, 2021 23:56
Common Mac Software
#!/bin/bash
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
brew update
brew install --cask iterm2
brew install wget
brew install --cask spotify
brew install --cask spotify-notifications
@krisiye
krisiye / postgresql_cheat_sheet.sql
Last active February 16, 2025 17:47
Useful queries for postgresql for monitoring queries and disk usage
-- Temporary file usage by database
SELECT datname AS "database", temp_files AS "Temporary files", temp_bytes
AS "Size of temporary files"
FROM pg_stat_database;
-- Cache Hit Ratio. Anything greater than 90% is always good
SELECT sum(blks_hit)*100/sum(blks_hit+blks_read) AS hit_ratio FROM pg_stat_database;
-- Top Queries
SELECT substr(query, 0, 250), calls,
@mmillar-bolis
mmillar-bolis / Launchctl_Unload-10.14.sh
Created November 23, 2020 07:46
A Quick Little Script to Force Disable Certain LaunchDaemons in macOS
#!/bin/bash
# I have managed to map out some undesirable daemons and agents. Most of these
# can be disabled without too much consequence.
## Daemons
# com.apple.analyticsd - Anonymized application analytics daemon
# com.apple.appleseed.fbahelperd - Feedback Assistant Helper Daemon
# com.apple.awacsd - Apple Wide Area Connectivity Service Daemon
# com.apple.backupd - Apple TimeMachine service
@selimslab
selimslab / get_gists.py
Last active December 23, 2023 15:52 — forked from leoloobeek/get_gists.py
Download all gists of a user
import sys
from subprocess import call
import json
import os
import requests
def download_gists(gists: list):
for gist in gists:
call(["git", "clone", gist["git_pull_url"]])
@antonydevanchi
antonydevanchi / banks-websites-from-cbr.txt
Created September 9, 2020 02:40
Parsed cbr.ru/banking_sector/credit/FullCoList/
131.ru
1cb.ru
1erc.ru
2019.delo.ru
3ds.ubrr.ru
3dsmc.ubrr.ru
7305115.ru
abr.ru
absolutbank.ru
achinsk.ubrr.ru
@tresni
tresni / README.md
Created September 8, 2020 17:49
Enabling Yubikey for sudo on OSX

Intro

Primarily, I use TouchID for sudo authentication on OSX, but I also tend to be connected to a CalDigit TS3 Plus dock and external monitors with my laptop lid closed. TouchID does not work in that situation.

In my quest to have another solution I found the instructions from Yubikey[1][2]. Unfortunately, the instructions are not well laid out, with formatting issues and some necessary information just missing. I hope to rectify that with this document.

Prerequisites

This has been tested on MacOS 10.14.6 and should work on MacOS 10.15. This README assumes you are using Homebrew; it should be possible to configure everything w