Skip to content

Instantly share code, notes, and snippets.

View dansleboby's full-sized avatar

Gilbert Paquin dansleboby

View GitHub Profile
@dansleboby
dansleboby / get_subtitle_files.js
Created October 23, 2024 04:33
Suno.com Aligned Words Fetcher to SRT or LRC file
// ==UserScript==
// @name Suno Aligned Words Fetcher with Auth
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Fetch aligned words with auth and add a button under the image on Suno pages.
// @author Your Name
// @match https://suno.com/song/*
// @grant none
// ==/UserScript==
@dansleboby
dansleboby / update_php_var_all.sh
Created July 4, 2024 20:50
PHP Configuration Update Script cPanel/WHM
#!/bin/bash
# Define color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
# Function to display help
display_help() {
@dansleboby
dansleboby / yubico_matrix_security.php
Last active March 20, 2023 04:43
Yubico protocol supported matrix wikipedia generator
<?php
header('Content-Type: text/plain');
$partners = file_get_contents("https://wwyk.yubico.com/api/v2/partnerproducts");
// Decompress gz data
$partners = gzdecode($partners);
$partners = json_decode($partners, true);
$protocols = array_column($partners['protocols'], 'protocol_name', 'protocol_id');
@dansleboby
dansleboby / camscanner2invoiceninja.php
Created February 17, 2018 08:17
Little script to sync camscanner with Invoice Ninja Expenses
<?php
/*
Little script to sync camscanner with Invoice Ninja Expenses
-> How to use <-
1. create composer.json and run an update to get curl helper
2. Set 2 variables of invoice ninja
3. run php index.php
4. You will get an url https://api.intsig.net/qr_login/image?qrl_id=XXXXXXXXXXXXXXXX you need to open this in browser and scan with app to login in script
5. Enjoy!
@dansleboby
dansleboby / CamSacnnerApi.php
Last active July 31, 2017 05:23
API to retrive, rename and delete docs fom camsacnner.net
<?php
class CamSacnnerApiHttpError extends Exception {}
class CamSacnnerApiBadLogin extends Exception {}
class CamSacnnerApiError extends Exception {}
class CamSacnnerApi {
private $baseUrl = "https://www.camscanner.com";
private $baseUrlJpg = null;
@dansleboby
dansleboby / Change language of Snipcart with Javascript
Last active June 7, 2016 22:44
Change language of Snipcart with Javascript
function SnipcartLanguage(lang) {
if(jQuery.inArray(lang, Snipcart.locales) !== -1) {
if(jQuery.inArray(lang, Object.keys(Snipcart.i18n._locales)) !== -1) {
console.log("Change language to: " + lang);
Snipcart.i18n.lang(lang);
} else {
console.log("Download language "+lang+" ...");
//From github: https://cdn.rawgit.com/snipcart/snipcart-localization/master/locales/
jQuery.getScript("https://cdn.snipcart.com/scripts/2.0/snipcart/l10n/locales/" + lang + ".js").done(function() {