Skip to content

Instantly share code, notes, and snippets.

View xLinkOut's full-sized avatar
🔵

Luca xLinkOut

🔵
View GitHub Profile
#!/bin/bash
TELEGRAM_BOT_TOKEN="<token>"
TELEGRAM_CHAT_ID="<chat-id>"
HOSTNAME=$(hostname)
STATE_FILE="path/to/ssh_watcher_state"
LOG_FILE="/var/log/auth.log"
send_telegram() {
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Quick Notes</title>
<style>
* {
margin: 0;
padding: 0;
@xLinkOut
xLinkOut / ig_collections_organizer.user.js
Created June 2, 2024 09:32
ig_collections_organizer
// ==UserScript==
// @name Instagram Grid Parser
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Adds a button to run the parse_grid function on Instagram and save data in the browser
// @author You
// @match https://www.instagram.com/*/saved/*
// @grant none
// ==/UserScript==
@xLinkOut
xLinkOut / game_of_life.py
Created August 4, 2023 10:01
Implementation of popular "Game of Life", written in Python using Tkinter.
import random
import tkinter as tk
from pathlib import Path
from time import sleep
from tkinter import filedialog, messagebox, simpledialog
from turtle import RawTurtle, TurtleScreen
from pprint import pprint
"""
Lo script simula una griglia quadrata del mondo di lato l per t istanti.
const main = document.getElementsByTagName("main")[0];
const grid = main.firstChild.firstChild.lastChild.firstChild.firstChild.firstChild;
const loader = main.firstChild.firstChild.lastChild.firstChild.lastChild;
const footer = document.getElementsByTagName("footer")[0];
const domain = "https://www.instagram.com";
const urls = new Set();
function parse_grid() {
for (const node of grid.childNodes) {
@xLinkOut
xLinkOut / not-interested.js
Created May 1, 2020 10:15
Click on "Not interested" for each suggested video in Youtube Homepage (first 8 videos)
// Prendo tutti i tasti menu con tre puntini verticali
vertical_menu = document.querySelectorAll("yt-icon.style-scope.ytd-menu-renderer")
// Ciclo solo sui primi otto
for(i=0;i<8;i++){
// Clicco sul tasto menu con i tre puntini
vertical_menu[i].click() // Si apre il popup
// Seleziono il popup
popup = document.getElementsByTagName("ytd-popup-container")[0]
// Seleziono i tasti del popup
@xLinkOut
xLinkOut / post-installation-ubuntu.sh
Created March 31, 2020 10:30
Bash script (and .md description) to finalize Ubuntu installation on ASUS N552VW
#!/bin/bash
: '
# Ubuntu post-installation script
## Updates and Software
After an update && upgrade, required softwares are:
+ Firefox (firefox)
+ Telegram Desktop (telegram-desktop)
@xLinkOut
xLinkOut / vb-xor-encryption.vb
Created March 28, 2020 15:07
VB Class to encrypt and decrypt data via XOR.
Public Class Encryption
Public Shared Function XORDecryption(ByVal CodeKey as String, ByVal DataIn as String)
Dim lonDataPtr as Long
Dim strDataOut as String = String.empty
Dim intXOrValue1 as Integer
Dim intXOrValue2 as Integer
For lonDataPtr = 1 to (Len(DataIn) / 2)
intXOrValue1 = Val("&H" & (Mid$(DataIn,(2*lonDataPtr) - 1,2)))
intXOrValue2 = Asc(Mid$(CodeKey,((lonDataPtr Mod Len(CodeKey)) + 1), 1))
@xLinkOut
xLinkOut / sushi-go-round.py
Last active March 28, 2020 15:03
An ugly Python automation script for an as much ugly-addictive flash game.
from PIL import ImageGrab,ImageOps
import os, time, win32api, win32con, numpy
"""
All coordinates assume a screen resolution of 1920x1080, and Firefox
attached to the left side of the screen, with the Bookmarks Toolbar enabled.
x_pad = 19
y_pad = 237
Play area = x_pad+1, y_pad+1, 659, 717
"""
@xLinkOut
xLinkOut / lumberjack-bot.au3
Last active March 28, 2020 14:51
A simple AutoIt bot for 'LumberJack' Telegram game.
HotKeySet("{PAUSE}","_Exit")
$WhereIs = 1 ; 0 = Sinistra, 1 = Destra
$SleepTime = 135 ;Valori più bassi non permettono la corretta esecuzione
;Punteggio massimo raggiunto: 299
PixelSearch(480,985,480,985,0xF2C38C)
If Not @error Then
MouseClick('left',480,980,1,1)
EndIf