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 / lastfm2yt
Created July 8, 2014 17:57
Search Youtube for all Last.fm loved tracks (run in console)
jQuery('.subjectCell').each(function(i,e){ var url = 'https://www.youtube.com/results?search_query='+encodeURIComponent(jQuery.trim(jQuery(e).text())); window.open(url,'_blank'); });
var links = $('a[onclick="return fixone(this)"]');
function makeitso(a,i) {
if (i < a.length) {
setTimeout(function() {
console.log("Clicking next link");
a[i].click();
makeitso(a, i+1);
}, 1000*15);
} else {
console.log('DONE!!');

Hex Codes for Cryptocurrencies

Based on the logos/main colors used for the crypto

  • BTC #f69c3d
  • ETH #497493
  • VTC #205b30
  • DASH #1376b5
  • XMR #fc6621
@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"

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 / 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 [email protected]
npm init -y
@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 "[email protected]"
npm set init.author.url "https://mataic.com"
npm set init.license "MIT"
npm set init.version "1.0.0"
@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

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
// 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;