Skip to content

Instantly share code, notes, and snippets.

View Eddy-Barraud's full-sized avatar

Eddy Barraud Eddy-Barraud

View GitHub Profile
@Eddy-Barraud
Eddy-Barraud / random_alphanum.py
Created September 21, 2018 18:50
generate a random alphanumeric string with 16 keys
## generate a random alphanumeric string with 16 keys
import random, string
x = ''.join(random.choices(string.ascii_letters + string.digits, k=16))
print(x)

Mount on O: drive letter your onedrive root folder as webdav and save the credentials.

net use O: https://d.docs.live.net/{cid}/ /savecred /p:yes

Detailled tuto here

//Supprimer les scripts et css de la page d'accueil
function remove_scripts_home() {
if (is_home()){
wp_dequeue_script( 'script_handle' );
wp_deregister_script( 'script_handle' );
}
}
add_action('wp_print_scripts', 'remove_scripts_home', 100);
// list loaded assets by our theme and plugins so we know what we're dealing with. This is viewed by admin users only.
add_action('wp_print_footer_scripts', 'wra_list_assets', 900000);
function wra_list_assets(){
if ( !is_admin() ){
return;
}
echo '<h2>List of all scripts loaded on this particular page.</h2>';
echo '<p>This can differ from page to page depending of what is loaded in that particular page.</p>';
<head>
<!-- Import the amp-gist component -->
<script async custom-element="amp-gist" src="https://cdn.ampproject.org/v0/amp-gist-0.1.js"></script>
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
<style amp-custom>
amp-gist {
margin: 1rem;
}
</style>
</head>
@Eddy-Barraud
Eddy-Barraud / phoronix-cmd.md
Last active September 2, 2018 14:05 — forked from anshula/phoronix-cmd.md
Phoronix Test Suite Cheat Sheet
@Eddy-Barraud
Eddy-Barraud / benchmark.md
Last active June 2, 2020 17:10
benchmark

Easily benchmarking any computer

  • disk

    #very litle files 
    dd if=/dev/zero of=/tmp/output bs=1024 count=100k; rm -f /tmp/output
    #litle files 
    dd if=/dev/zero of=/tmp/output bs=8k count=10k; rm -f /tmp/output
    #big files 
    dd if=/dev/zero of=/tmp/output bs=8M count=10; rm -f /tmp/output
    #biggest files 

Folder location of Win+X menus :

%LocalAppData%\Microsoft\Windows\WinX

SoftWare to edit the menus here

<?php
$characters = ["a", "b", "c", "d", "e", "f", "g", "h",
"i", "j", "k", "l", "m", "n", "o", "p",
"q", "r", "s", "t", "u", "v", "w", "x",
"y", "z", "A", "B", "C", "D", "E", "F",
"G", "H", "I", "J", "K", "L", "M", "N",
"O", "P", "Q", "R", "S", "T", "U", "V",
"W", "X", "Y", "Z", "1", "2", "3", "4",
"5", "6", "7", "8", "9", "0"];
@Eddy-Barraud
Eddy-Barraud / Rclone-Fuse.md
Created August 26, 2018 15:32
Mount cloud disk (OneDrive,etc...) In Linux Using Rclone (&fuse)

Thanks to Rclone you can mount any kind of cloud disk !

Begin by installing rclone

curl https://rclone.org/install.sh | sudo bash

Add a new remote to Rclone

rclone config ...

detailed instructions HERE : https://rclone.org/docs/