Skip to content

Instantly share code, notes, and snippets.

@Benoitlecorre
Benoitlecorre / algo_apb_proper.sql
Last active June 16, 2020 12:09
Code source d'Admission post-bac envoyé par le ministère de l'Education nationale
-- Génération automatique de classements aléatoires en production, pour les FNS
-- ===================================
FUNCTION gen_class_aiea_v1_relatif_grp( o_g_ea_cod_ins IN varchar2, o_g_ti_cod IN number, o_c_gp_cod IN number, o_g_tg_cod IN number, iogin IN varchar2, type_login IN number, mode_dev IN number, confirm IN number, saio IN number, nip IN varchar2, indic IN number, mess_err out varchar2, mess_aff out varchar2)
RETURN number IS
retour number;
X varchar2(2);
dummy number;
dummy2 number;
l_c_gp_fIg_seI c_grp.c_gp_flg_sel%type;
@baptx
baptx / twitter_api_1.1_backup.js
Last active July 29, 2022 10:00
Twitter API 1.1 tweets / favorites (likes) / following / followers backup in web browser
/* Twitter API 1.1 tweets / favorites (likes) / following / followers backup in web browser
* Get your access keys to use Twitter API 1.1: https://dev.twitter.com/docs/auth/tokens-devtwittercom
* You can change Twitter API URL and Twitter screen_name, then execute script from a trusted web page without CSP protection like about:blank in a web browser console (F12 or Ctrl+Shift+K shortcut)
* A textarea will appear so you can copy/paste to save data as a CSV file or search tweets / users in your web browser (Ctrl+F shortcut)
* You can then view your backup in a spreadsheet editor like LibreOffice Calc
* You can also compare the backup with another one to see who unfollowed you, who changed their Twitter username by looking at the user ID or which tweet you retweeted / favorited was deleted (e.g. with the Linux diff command)
*
* Note about the tweets backup:
* Usually you will search tweets that you retweeted using Twitter web version (https://twitter.com/search) with a search like "from:your_username f
@eteubert
eteubert / wordpress-passwort-reset-unmultisite.php
Last active March 1, 2024 14:00
Multisite: Passwort Reset on Local Blog
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/
@uzxmx
uzxmx / enable_nativebridge
Created January 28, 2018 08:55
android x86 /system/bin/enable_nativebridge
#!/system/bin/sh
PATH=/system/bin:/system/xbin
houdini_bin=0
dest_dir=/system/lib$1/arm$1
binfmt_misc_dir=/proc/sys/fs/binfmt_misc
if [ -z "$1" ]; then
if [ "`uname -m`" = "x86_64" ]; then