Skip to content

Instantly share code, notes, and snippets.

@sainak
sainak / icon.url
Created November 8, 2023 12:34
pake youtube music patch
# https://macosicons.com
https://parsefiles.back4app.com/JPaQcFfEEQ1ePBxbf6wvzkPMEqKYHhPYv8boI1Rc/6ba4356c379a0e212b2af5a8ef1a57ef_YouTube%20Music.icns
@sainak
sainak / 50-cloud-init.yaml
Last active February 9, 2024 06:16
Netplan configuration for network interface failover.
network:
version: 2
ethernets:
enp9s0:
dhcp4: false
wifis:
wlan0:
access-points:
"wifi":
password: "pass"
@sainak
sainak / disconf
Last active February 13, 2025 18:40
#!/usr/bin/env bash
# Util to set up displays using displayplacer: https://github.com/jakehilborn/displayplacer
# to get the display id run `displayplacer list | grep -A2 Serial`
DISPLAY_1=s4251086178
DISPLAY_2=s261348
if [ "$#" -ne 1 ]; then
@sainak
sainak / sshmap.md
Last active August 6, 2024 17:11
bash oneliner to quicly scan lan for open ssh servers
seq 1 254 | xargs -P255 -I{} bash -c 'ip="192.168.1.{}"; ping -c 1 -W 1 $ip >/dev/null 2>&1 && { nc -z -w 1 $ip 22 2>/dev/null && echo "$ip: Port 22 is open" || echo "$ip: Port 22 is closed"; }' | sort -n -t . -k 4,4
// enable drive api service
// manually set a time-driven trigger(the alarm icon) that runs monthly after 25th evening,
function entrypoint() {
return main();
}
function deIndent(str) {
return str.replace(/^[ \t]+/gm, "");
}
@sainak
sainak / index.html
Created February 10, 2025 17:56
MDN Mandala
<div aria-hidden="true" class="mandala-container animate-colors">
<div class="mandala-svg-container"><svg width="675" height="675" viewBox="0 0 675 675" fill="none" xmlns="http://www.w3.org/2000/svg" class="mandala">
<title>Mandala</title>
<defs>
<path d="M337.5,337.5 m-320,0 a320,320 0 1,1 640,0 a320,320 0 1,1 -640,0" id="circle1">
<animateTransform attributeName="transform" begin="0s" dur="500s" type="rotate" from="0 337.5 337.5" to="360 337.5 337.5" repeatCount="indefinite"></animateTransform>
</path>
<path d="M337.5,337.5 m-280,0 a280,280 0 1,1 560,0 a280,280 0 1,1 -560,0" id="circle2">
<animateTransform attributeName="transform" begin="0s" dur="500s" type="rotate" from="360 337.5 337.5" to="0 337.5 337.5" repeatCount="indefinite"></animateTransform>
</path>