Skip to content

Instantly share code, notes, and snippets.

View superbiche's full-sized avatar
🕹️
Working from everywhere

Michel Tomas superbiche

🕹️
Working from everywhere
View GitHub Profile
@michaelbutler
michaelbutler / Install_PHP_on_Arch_Manjaro.md
Last active February 28, 2024 09:09
Install multiple PHP versions on Arch / Manjaro Linux

Install Any PHP on Arch / Manjaro

Through the AUR it is possible to install older and newer PHP versions, simultaneously on the same system. I often had trouble installing using pacman and pamac so here's what I did:

mkdir -p $HOME/bin
mkdir ~/src
cd ~/src
git clone https://aur.archlinux.org/php81.git
cd php81
@superbiche
superbiche / cache-warmer.py
Last active June 21, 2020 00:17 — forked from hn-support/cache-warmer.py
A threaded cache warmer in python
#!/usr/bin/env python
"""
Warm the caches of your website by crawling each page defined in sitemap.xml (can use a local file or an URL).
To use, download this file and make it executable. Then run:
./cache-warmer.py --threads 4 --url http://example.com/sitemap.xml -v
"""
import argparse
import multiprocessing.pool as mpool
import os.path
import re
@j1mc
j1mc / bulma-sass-scss.rb
Last active August 14, 2023 05:04 — forked from DanyHenriquez/bulma-sass-scss.rb
Convert bulma from sass to scss
#!/usr/bin/env ruby
require 'tmpdir'
require 'fileutils'
dir = Dir.tmpdir()
if File.directory?("#{dir}/bulma")
FileUtils.remove_dir("#{dir}/bulma")
end
@MoOx
MoOx / README.md
Last active May 11, 2023 13:59
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
@dispix
dispix / CHANGELOG.md
Last active February 15, 2021 16:23
OAUTH2 Authentication and token management with redux-saga

Revision 5

  • Fix error parsing

Revision 4

  • Add missing yield in the login function

Revision 3

@hn-support
hn-support / cache-warmer.py
Last active July 18, 2023 09:07
A threaded cache warmer in python
#!/usr/bin/env python
"""
Warm the caches of your website by crawling each page defined in sitemap.xml.
To use, download this file and make it executable. Then run:
./cache-warmer.py --threads 4 --file /data/web/public/sitemap.xml -v
"""
import argparse
import multiprocessing.pool as mpool
import os.path
import re
@rniswonger
rniswonger / wp-disable-plugin-update.php
Last active January 3, 2024 15:21
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Place in theme functions.php or at bottom of wp-config.php
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
if ( isset( $value->response['plugin-folder/plugin.php'] ) ) {
unset( $value->response['plugin-folder/plugin.php'] );
}
@rg3915
rg3915 / graph_models.md
Last active February 20, 2024 07:39
Generate graphic model Django with PyGraphViz pygraphviz pydot generate model graph model 2020

How to generate graphic model Django with PyGraphViz?

sudo apt-get install -y graphviz libgraphviz-dev pkg-config
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install pygraphviz
pip uninstall pyparsing
pip install -Iv https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709
@fpytloun
fpytloun / glustertop.py
Last active August 21, 2022 14:11
Real time GlusterFS top-like monitoring
#!/usr/bin/env python3
"""
Display gluster traffic
This tool uses gluster profiling feature, parsing cumulative statistics.
To understand correctly the results, you have to divide overall write statistics with number of replicas.
Also striped volumes needs to be taken in mind - overall statistics just print sum of all bricks
read/written bytes.
@rendro
rendro / parsecookie.js
Last active February 28, 2024 03:05
Parse document.cookie into object
document.cookie.split(';').map(function(c) {
return c.trim().split('=').map(decodeURIComponent);
}).reduce(function(a, b) {
try {
a[b[0]] = JSON.parse(b[1]);
} catch (e) {
a[b[0]] = b[1];
}
return a;
}, {});