Skip to content

Instantly share code, notes, and snippets.

View agentcobra's full-sized avatar
🇫🇷

agentcobra agentcobra

🇫🇷
View GitHub Profile
@Albirew
Albirew / InviReg.user.js
Last active August 20, 2020 22:38 — forked from Tazeki/Reghook.js
YouTube / Invidious RegEx based URL conversion.
// ==UserScript==
// @name InviReg - YouTube->Invidious
// @author Albirew, heavily based on script by Tazeki
// @namespace https://gist.github.com/Albirew/
// @description The smallest, possibly most useful YouTube-Invidious conversion script. RegEx based. Sends any /www.youtube.com/ sites to Invidious before page load. Does not affect /other.youtube.com/, (gaming.youtube.com, creatoracademy.youtube.com, etc.).
// @include *youtube*
// @version 1.1c
// @icon https://invidious.fdn.fr/favicon.ico
// @grant none
// @run-at document-start
@tkafka
tkafka / listAllEventListeners.js
Last active January 24, 2024 22:52 — forked from dmnsgn/listAllEventListeners.js
List all event listeners in a document
console.table((function listAllEventListeners() {
const allElements = Array.prototype.slice.call(document.querySelectorAll('*'));
allElements.push(document); // we also want document events
const types = [];
for (let ev in window) {
if (/^on/.test(ev)) types[types.length] = ev;
}
let elements = [];
for (let i = 0; i < allElements.length; i++) {
@outout14
outout14 / README-Template.md
Last active October 23, 2021 09:33 — forked from PurpleBooth/README-Template.md
Une template pour faire un joli README.md

Titre du projet

(juste en dessous des badges sympatiques à placer)

forthebadge forthebadge

Une petite description du projet

Pour commencer

Entrez ici les instructions pour bien débuter avec votre projet...

@regnauld
regnauld / ipam-tools.md
Last active November 6, 2023 01:27
Overview of IPAM/DCIM tools - July 2016
#!/usr/bin/python
# -*- coding: utf-8
"""
Tweet ton speed test
======================
Appelle l'api en ligne de commande
speed test, parse le resultat, et envoie un
tweet au compte du FAI si les valeurs
sont considérées trop basses.
@wpmarmite
wpmarmite / template-toto.php
Created January 29, 2016 13:48
En-tête à inclure dans les modèles de page personnalisés
<?php
/*
Template Name: [Nom du modèle de page]
*/
?>
@agentcobra
agentcobra / mixTest.ino
Last active August 29, 2015 14:17
ThiBarduino
#include <LiquidCrystal.h>
// select the pins used on the LCD panel
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
// define some values used by the panel and buttons
int lcd_key = 0;
int adc_key_in = 0;
#define btnSELECT 4
// read the buttons
@javikalsan
javikalsan / execute_on_router.sh
Created March 26, 2014 15:59
Simple Bash Script to execute a command on the router through telnet command
#!/bin/sh
# replace cmd1 for the command to execute
host=192.168.1.1
port=23
user=myuser
pass=mypass
cmd1='ifconfig wl0 down'
( echo open ${host}
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
# Tkinter and GPIO together
from Tkinter import *
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(24, GPIO.OUT)
GPIO.output(24, GPIO.LOW)
def toggle():