Skip to content

Instantly share code, notes, and snippets.

@ssavva05
ssavva05 / cmd-colors.reg
Created December 5, 2020 23:52 — forked from Zantier/cmd-colors.reg
Registry file: Add WSL Ubuntu Bash to the context menu of folders in File Explorer.
Windows Registry Editor Version 5.00
; Delete directories under HKEY_CURRENT_USER\Console, then run this
; Examples: https://gist.github.com/P4/4245793
[HKEY_CURRENT_USER\Console]
"WindowAlpha"=dword:000000cd
"DefaultBackground"=dword:00000000
; black dgray
"ColorTable00"=dword:00141414
@ssavva05
ssavva05 / fix_exfat_drive.md
Created July 27, 2020 16:58 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
@ssavva05
ssavva05 / generate-ssh-key.sh
Created June 22, 2020 11:36 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@ssavva05
ssavva05 / gist:4699064d979c807b96ed8d3d78cfb282
Created May 20, 2020 10:10 — forked from psayre23/gist:c30a821239f4818b0709
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array
@ssavva05
ssavva05 / mysql_query_log.md
Last active April 29, 2020 10:39 — forked from joseluisq/mysql_query_log.md
How to enable the MySQL/MariaDB general query logs

How to enable the MySQL/MariaDB general query logs

  1. Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot
  1. Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
@ssavva05
ssavva05 / grafana-dashboard-exporter
Created February 28, 2020 15:08 — forked from crisidev/grafana-dashboard-exporter
Command to export all grafana 2 dashboard to JSON using curl
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master

PS2 BIOS/ROM Contents

Here is an overview of what is contained in a PS2 ROM (including TOOL, DESR/PSX, ps2emu/ps2gxemu/ps2softemu (PS3), System 246 and System 256).
An updated version is available here: https://playstationdev.wiki/ps2devwiki/index.php?title=Bios

Contributors

SP193

Files

ACDEV - Arcade ROM device service.

@ssavva05
ssavva05 / skypestatus.ahk
Created October 20, 2019 10:47 — forked from mickdekkers/skypestatus.ahk
Change your Skype status programmatically
#NoEnv
#NoTrayIcon
#SingleInstance ignore
; The path to Skype's executable
skypePath := "C:\Program Files (x86)\Skype\Phone\Skype.exe"
; Used to identify Skype's main window
skypeWin := "ahk_exe Skype.exe ahk_class tSkMainForm"
; The X coordinate of all the status buttons
statusXCoord := 56
@ssavva05
ssavva05 / skypestatus.ahk
Created October 20, 2019 10:47 — forked from mickdekkers/skypestatus.ahk
Change your Skype status programmatically
#NoEnv
#NoTrayIcon
#SingleInstance ignore
; The path to Skype's executable
skypePath := "C:\Program Files (x86)\Skype\Phone\Skype.exe"
; Used to identify Skype's main window
skypeWin := "ahk_exe Skype.exe ahk_class tSkMainForm"
; The X coordinate of all the status buttons
statusXCoord := 56