Skip to content

Instantly share code, notes, and snippets.

View moalex's full-sized avatar
🫛
Farting

moalex moalex

🫛
Farting
View GitHub Profile
@moalex
moalex / Sony WH-1000XM4.md
Last active July 15, 2025 13:31 — forked from peters/Sony WH-1000XM4.md
Sony WH-1000XM4 connect Ubuntu 22.04

Connecting Sony WH-1000XM4 to Ubuntu 22.04 (Jammy)

This guide will help you connect your Sony WH-1000XM4 headset to Ubuntu 22.04 using Bluetooth. Once connected, you'll be able to listen to music and use the microphone on apps like Microsoft Teams.

1. Connect to Bluetooth Headset

Steps:

  1. Open a terminal and launch bluetoothctl:
@moalex
moalex / youtube_watch_later.js
Created August 22, 2022 15:15 — forked from spyesx/youtube_watch_later.js
Get URLs of your youtube watch later playlist
// Execute this in the console of on your own playlist
var videos = document.querySelectorAll('.yt-simple-endpoint.style-scope.ytd-playlist-video-renderer');
var r = [];
var json = [];
r.forEach.call(videos, function(video) {
var url = 'https://www.youtube.com' + video.getAttribute('href');
url = url.split('&list=WL&index=');
url = url[0];
@moalex
moalex / youtube_watch_later.js
Created August 22, 2022 15:15 — forked from spyesx/youtube_watch_later.js
Get URLs of your youtube watch later playlist
// Execute this in the console of on your own playlist
var videos = document.querySelectorAll('.yt-simple-endpoint.style-scope.ytd-playlist-video-renderer');
var r = [];
var json = [];
r.forEach.call(videos, function(video) {
var url = 'https://www.youtube.com' + video.getAttribute('href');
url = url.split('&list=WL&index=');
url = url[0];
@moalex
moalex / gist:b48816a07da1ba1b24745e6c1c9f6e36
Created April 14, 2022 23:07 — forked from beh/gist:3549933
Add bookmark to pinbord.in with predefined tag, without user intervention
javascript:q=location.href;if(document.getSelection){d=document.getSelection();}else{d='';};p=document.title;void(open('https://pinboard.in/add?later=yes&noui=yes&jump=close&tags=TAGS GO HERE&url='+encodeURIComponent(q)+'&description='+encodeURIComponent(d)+'&title='+encodeURIComponent(p),'Pinboard','toolbar=no,width=100,height=100'));
// Copy and paste the above into a new bookmark. Replace "TAGS GO HERE" with your tags. Presto!
<?php
// autoload_namespace.php generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Volcanus\\Validation' => $vendorDir . '/volcanus/validation/src/',
'Symfony\\Component\\HttpFoundation' => $vendorDir . '/symfony/http-foundation/',
@moalex
moalex / composer-devhints.md
Last active February 22, 2022 14:18 — forked from robdecker/1.md
[Composer commands] #composer #d8
@moalex
moalex / aria2.conf
Created January 16, 2022 14:26 — forked from dinigo/aria2.conf
Aria2c config files and init scripts
# place under ${HOME}/.aria2/
# Daemonize, rpc and session save.
# The daemon is launched by the rpc query and
# stops when all downloads are completed.
continue
daemon=true
on-download-complete=exit
dir=/home/**youruser**/path/to/download/folder
@moalex
moalex / document.ready.ts
Created April 1, 2019 22:58 — forked from supermoos/main.ts
TypeScript jQuery document ready
///<reference path="./typings/jquery/jquery.d.ts"/>
'use strict';
class Main {
constructor() {
jQuery(document).ready(() => {
console.log('Hello from app/scripts/ts/Main.ts');
});
}
}