Skip to content

Instantly share code, notes, and snippets.

View lethak's full-sized avatar
✌️
Nothing is really work unless you would rather be doing something else.

LethaK Maas lethak

✌️
Nothing is really work unless you would rather be doing something else.
  • FR
View GitHub Profile
@lethak
lethak / getGlobalHomonymes.js
Last active November 15, 2021 15:42
Custom Homonyms Generator
let getHomonymes = function (pseudo = '') {
const homonymes = []
const map = {
'o': ['O', '0'],
'O': ['0', 'o'],
'0': ['o', 'O'],
'i': ['L', 'l', 'I', '1'],
'I': ['L', 'l', 'i', '1'],
'1': ['L', 'l', 'i', 'I'],
'l': ['L', '1', 'i', 'I'],
@lethak
lethak / difm_onWebplayerTrackChange.js
Last active March 12, 2020 00:37
DI.FM hook "onWebplayerTrackChange"
//----
// Educational gist based from my understanding working on https://github.com/lethak/LTKDIFMU-userscript
//----
// Defining our event listener
function onWebplayerTrackChange (e) {
// 'e' is a BackboneJS Model: @see https://cdnjs.com/libraries/backbone.js/tutorials/what-is-a-model
// creating a payload variable with track data
const payload = e ? {
@lethak
lethak / deleteFacebookActivityLogTimelinePost.js
Last active October 10, 2019 11:26
Delete Facebook Activity Log Timeline Post
/*
REQUIREMENTS:
You must use Facebook in the English language
HOW-TO:
First, open your FaceBook Activity Log Page (https://www.facebook.com/<YOUR PROFILE HANDLE>/allactivity?privacy_source=activity_log_top_menu&entry_point=www_top_menu_button#)
Then, select a Year and scroll to bottom until you reached "January" for this year.
Then, copy/paste the following code into the javascript console (F12) and press ENTER.
NOTES:
This will not delete Likes, only your posted content.
The current month is also in the scope to be removed since the page opens on it.
@lethak
lethak / CallbackSquashingThrottler.js
Created December 5, 2018 20:05
This class will apply a delay before resolving and returning your last callback.
const uuidv4 = require('uuid/v4')
const delayPromise = function (duration) {
return function (...args) {
return new Promise(function (resolve, reject) {
setTimeout(function () {
resolve(...args)
}, duration)
})
}
@lethak
lethak / tbb_clone.sh
Last active December 28, 2021 21:31
Clone a default TOR browser instance to allow the clones to be ran as multiple TOR Browser instances with different IPs. If you want the same effect without the Browser, head over https://github.com/lethak-docker/tor-clients
#!/bin/bash
# HOWTO MAKE IT WORK ?
#
# Required for windows user: you may want to have linux friendly shell already installed (Git-Bash is doing a fine job and easy to install)
# Then,
# Go to Tor Browser install directory ex: "C:\Programs\Tor Browser"
# Create and or copy this script there under the name "tbb_clone.sh" (name and path not important if you know what you are doing)
# Run the script ex: "bash ./tbb_clone.sh -n 4 -p ./Browser"
# This will create 4 copies of the "Browser" folder named "TBB1" to "TBB4"
const enabled = (typeof process.env.DEBUG_ENABLED === 'undefined') ? false : process.env.DEBUG_ENABLED
const functionList = Object.keys(global.console)
export const factory = function (prefix, consoleObject) {
if (typeof prefix === 'undefined') {
prefix = null
}
if (typeof consoleObject === 'undefined') {
consoleObject = global.console
}
@lethak
lethak / js_tool_isDevtoolOpen.js
Created January 30, 2018 14:17
Detect if the browser devtool (console) is in use or not
/**
* @returns bool whether the browser devtool is in use or not
*/
exports.isDevtoolOpen = function () {
let isOpen
let element = new Audio() // does not shows unless verbose filter selected
Object.defineProperty(element, 'id', {
get: function () {
isOpen = true
return null
#!/bin/bash
winpty openssl genrsa -des3 -out server.key 1024
winpty openssl req -new -key server.key -out server.csr
winpty openssl x509 -req -days 1024 -in server.csr -signkey server.key -out server.crt
# removing the passphrase for some version of apache on windows
winpty openssl rsa -in server.key -out server_withoutpassphrase.key
// Made a browser extension : @see https://github.com/lethak/digitally_imported_userscript
// Stop anti-afk popup ? maybe
di.app.timedAlerts.stop()
// Wepplayer stuff
//AudioAddict.WP.wp.
// Removing ad providers to block ads ? maybe
AudioAddict.WP.AdManager.providers = {}
/*
Space Engeeneer - Whip's Rocket Guidance Script v11 - revised: 10/28/15
By Joshua Banks
*/
List<IMyTerminalBlock> remotes = new List<IMyTerminalBlock>();
List<IMyTerminalBlock> shooterRefrenceList = new List<IMyTerminalBlock>();
List<IMyTerminalBlock> missileRefrenceList = new List<IMyTerminalBlock>();
List<IMyTerminalBlock> gyroList = new List<IMyTerminalBlock>();
string shooterReferenceName = "[Shooter]";