Skip to content

Instantly share code, notes, and snippets.

View MiranDaniel's full-sized avatar
👾
So Long, and Thanks for All the Fish.

MiranDaniel MiranDaniel

👾
So Long, and Thanks for All the Fish.
  • debian.org
View GitHub Profile
@MiranDaniel
MiranDaniel / nginx.conf
Last active August 24, 2024 10:36
Default nginx configuration from Debian 12
user www-data;
worker_processes auto;
pid /run/nginx.pid;
error_log /var/log/nginx/error.log;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
REM*****BASIC*****
Sub Main
On error resume next
Wait 100
oDoc = ThisComponent
oSheet = oDoc.CurrentController.ActiveSheet
SD = oSheet.createSearchDescriptor()
SD.SearchRegularExpression = TRUE
REM*****BASIC*****
Sub Main
On error resume next
Wait 100
oDoc = ThisComponent
oSheet = oDoc.CurrentController.ActiveSheet
SD = oSheet.createSearchDescriptor()
SD.SearchRegularExpression = TRUE
@MiranDaniel
MiranDaniel / ban.text
Last active October 25, 2023 13:39
I hate Github
https://github.com/conduit/for_you_feed
https://github.com/dashboard/changelog
https://github.com/conduit/filter
https://github.com/dashboard/recent-activity
@MiranDaniel
MiranDaniel / linux.md
Created February 12, 2023 19:14
Linux commands and stuff

Watch CPU power draw

sudo turbostat --Summary --quiet --show Busy%,Avg_MHz,PkgTmp,PkgWatt --interval 1

GIF89a/*<svg/onload=alert(1)>*/=alert(document.domain)//;

Keybase proof

I hereby claim:

  • I am mirandaniel on github.
  • I am mirandaniel (https://keybase.io/mirandaniel) on keybase.
  • I have a public key ASCz1-REQk2Szd90DRTPQrBYcK1vuec4R6EbxHM4WOBVYgo

To claim this, I am signing this object:

@MiranDaniel
MiranDaniel / playtime.py
Last active June 6, 2022 14:13
Get Spotify total play time
import json
count = 10 # change this to the total count of endsong files
files = [f"endsong_{i}.json" for i in range(count+1)]
mstotal = 0
total = 0
for i in files:
data = json.load(open(i))
<?xml version="1.0" encoding="UTF-8"?>
<scriptfile>
<settings program="actiona" version="3.10.1" scriptVersion="1.1.0" os="GNU/Linux"/>
<actions>
<action name="ActionClick" version="1.0.0"/>
<action name="ActionGoto" version="1.0.0"/>
<action name="ActionKey" version="1.0.0"/>
<action name="ActionKeyboardKeyCondition" version="1.0.0"/>
</actions>
<parameters/>
@MiranDaniel
MiranDaniel / kill.js
Created March 31, 2022 08:42
Kill all TryHackMe machines
fetch('/api/vm/running')
.then(r => r.json())
.then(vms =>
vms.forEach(vm =>
fetch('/api/vm/terminate', {
method: 'POST',
body: JSON.stringify({ code: vm.roomId }),
headers: {
'csrf-token': csrfToken,
'Content-Type': 'application/json'