Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Available

fuomag9

🎯
Available
  • Italy
View GitHub Profile
@fuomag9
fuomag9 / clean-kubernetes-images.py
Last active Mar 18, 2021
Delete/cleanup all containerd kubernetes images on microk8s
View clean-kubernetes-images.py
import subprocess
a = subprocess.getoutput('microk8s.ctr i ls')
a = a.split("\n")
b = [x.split(" ")[0] for x in a]
del b[0]
ii = str(input(f"Do you want to delete {len(b)} images?"))
if ii == "yes" or ii=="y":
for x in b:
print(subprocess.getoutput(f'microk8s.ctr i rm {x}')+" has been deleted")
View gist:84637e44a0f96c947188d35b7aee4f55
find . -type f \
| xargs md5sum \
| sort -k1,1 \
| uniq -Dw32 \
| while read hash file; do
[ "${prev_hash}" == "${hash}" ] && rm -v "${file}"
prev_hash="${hash}";
done
View mimetypes.txt
application/andrew-inset
application/applixware
application/atom+xml
application/atomcat+xml
application/atomsvc+xml
application/ccxml+xml,
application/cdmi-capability
application/cdmi-container
application/cdmi-domain
application/cdmi-object
@fuomag9
fuomag9 / script.ps1
Created Jun 25, 2019
powershell autosubdomain
View script.ps1
$domain_path="D:\fuomag9\Documents\hacking\results\$domain\"
$domain_txt_1="$domain"+"_1.txt"
$domain_txt_2="$domain"+"_2.txt"
$domain_txt_3="$domain"+"_3.txt"
$domain_result="$domain"+"_result.txt"
$domain_result_temp="$domain"+"_result_temp.txt"
$domain_txt_1_path="$domain_path\$domain_txt_1"
View B.py
import sympy
from sympy import *
X = sympy.Symbol('x')
#f=parse_expr(str(input("inserisci la tua funzione\n")))
f=sin(X)-X**2
a=float(input("inserisci il minore dell'intervallo\n"))
View cssperiscope.css
/* Normal white Button as seen on Google.com*/
button {
color: #444444;
background: #F3F3F3;
border: 1px #DADADA solid;
padding: 5px 10px;
border-radius: 2px;
font-weight: bold;
font-size: 9pt;
outline: none;
@fuomag9
fuomag9 / autoclickperiscope.js
Last active Mar 21, 2019
clicca cuore auto periscope
View autoclickperiscope.js
// ==UserScript==
// @name clicca cuore auto periscope
// @namespace http://tampermonkey.net/
// @version 0.2
// @description try to take over the world!
// @author You
// @match https://www.pscp.tv/*
// @grant none
// ==/UserScript==
@fuomag9
fuomag9 / script.js
Created Mar 21, 2019
rimpiazza timeevent (roba di periscope)
View script.js
// ==UserScript==
// @name rimpiazza timeevent (roba di periscope)
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.pscp.tv/*
// @grant none
// ==/UserScript==
@fuomag9
fuomag9 / script.js
Created Feb 3, 2019
DNSDUMPSTER -> console
View script.js
// ==UserScript==
// @name DNSDUMPSTER -> console
// @namespace http://tampermonkey.net/
// @version 0.1
// @description DNSDUMPSTER -> console
// @author fuomag9
// @match https://dnsdumpster.com/
// @grant none
// ==/UserScript==
@fuomag9
fuomag9 / space2underscore.py
Last active Sep 6, 2018
Replace spaces with underscores for files in execution folder
View space2underscore.py
# coding=utf-8
import os
from os import listdir
from os.path import isfile, join
bot_path=os.getcwd()
lista_cibo=[f for f in listdir(bot_path) if isfile(join(bot_path, f))]
for x in lista_cibo:
os.rename(x,x.replace(" ","_"))