Skip to content

Instantly share code, notes, and snippets.

View arkon108's full-sized avatar
🎵

Saša Tomislav Mataić arkon108

🎵
View GitHub Profile
@arkon108
arkon108 / reclaim-sd-card-space.sh
Created December 1, 2023 10:49
Reclaim Full Storage Space on SD card on a Mac
# when a bootable SD card is created, the non-used space is converted to hidden partition
# step 0
# connect SD card and open terminal
# step 1
diskutil list
# step 2 find your sd card (e.g. /dev/disk4)
# step 3 erase the disk
@arkon108
arkon108 / auto-download-mp4-video.js
Created June 12, 2022 08:53
Automatically download source of the first video tag in page (e.g. from 9GAG)
let a = document.createElement("a");
a.href = window.URL.createObjectURL(new Blob([document.querySelectorAll("video:first-child source[type='video/mp4'")[0].src], {type: "video/mp4"}));
a.download = document.querySelectorAll('.main-wrap header h1')[0].textContent;;
a.click();
// find the first video tag, select the src attr in the source tag which matches "video/mp4"
const s = document.querySelectorAll("video:first-child source[type='video/mp4'");
window.location = s[0].src;

The minimal Node.js with Babel Setup

Nodemon

Once the project dir is created and initialized, install nodemon for development only

npm install nodemon --save-dev
@arkon108
arkon108 / .gitignore
Created January 25, 2022 15:43
Git track empty dir (e.g. uploads)
# Don't track files in this directory
*
# Don't track subdirs even
*/
# Except this file
!.gitignore
@arkon108
arkon108 / config-node-defaults
Created July 17, 2020 10:28
Configure Node project defaults
npm set init.author.name "STM"
npm set init.author.email "sasa@mataic.com"
npm set init.author.url "https://mataic.com"
npm set init.license "MIT"
npm set init.version "1.0.0"
@arkon108
arkon108 / start-node-project
Last active February 3, 2022 09:57
Start a node project (better npm init)
mkdir my_project
cd my_project
npx license mit > LICENSE
npx gitignore node
npx covgen stmataic@gmail.com
npm init -y

Setting up Raspberry PI as a NAS

1. Install Raspbian

Once installed, connect online, open the terminal and run

sudo apt-get update && sudo apt-get upgrade
@arkon108
arkon108 / no-sec-chrome.sh
Created January 15, 2019 12:53
Launch Chrome with web security turned off
open -na Google\ Chrome --args --disable-web-security --user-data-dir="/tmp/chrome_dev"

Hex Codes for Cryptocurrencies

Based on the logos/main colors used for the crypto

  • BTC #f69c3d
  • ETH #497493
  • VTC #205b30
  • DASH #1376b5
  • XMR #fc6621