Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
brahimmachkouri / GZLP01.txt
Last active June 12, 2022 21:00
Cheats Zelda The Wind Waker [PAL] (Gamecube WiiRD Code)
Maximum Health
003CC531 00000050
Infinite Health
003CC533 00000050
Never Lose Health
041F4A90 60000000
Never Drown
@brahimmachkouri
brahimmachkouri / install_latest_fusion_inventory.sh
Created March 9, 2022 19:01
Automatic installation of the latest version of fusioninventory in GLPI plugins directory
#!/bin/bash
githubproject="https://github.com/fusioninventory/fusioninventory-for-glpi/releases/latest/"
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject)
version=${url##*/}
tag=${version:4}
wget https://github.com/fusioninventory/fusioninventory-for-glpi/releases/download/$version/fusioninventory-$tag.tar.bz2
glpi_install=$(find /var -type f -name glpicrypt.key | sed -E 's/\/config\/glpicrypt\.key//')
tar xvf fusioninventory-$tag.tar.bz2 -C "$glpi_install/plugins/"
chown -R www-data:www-data "$glpi_install/plugins/fusioninventory"
rm fusioninventory-$tag.tar.bz2
@brahimmachkouri
brahimmachkouri / portainerv2-template.json
Created March 9, 2022 14:35
Template for Portainer v2
{
"version": "2",
"templates": [
{
"categories": [
"Music"
],
"description": "Airsonic is a free, web-based media streamer, providing ubiqutious access to your music. Use it to share your music with friends, or to listen to your own music while at work. You can stream to multiple players simultaneously, for instance to one player in your kitchen and another in your living room.",
"env": [
{
// GM_xmlhttpRequest GET
function getData(url, type = "document", usermethod = "GET") {
return new Promise((resolve, reject) => {
GM_xmlhttpRequest({
method: usermethod,
url: url,
responseType: type,
onload: function (response) {
if (response.status == 200) {
resolve(response.response);
from tkinter import *
import webbrowser
class MyApp:
def __init__(self):
self.window = Tk()
self.window.title("My Application")
self.window.geometry("720x480")
@brahimmachkouri
brahimmachkouri / nodejs.yml
Last active February 19, 2022 17:04
Ansible playbook to install nodejs 14
---
- name: ilovenode
hosts: dev
become: yes
gather_facts: no
tasks:
- name: Run the equivalent of "apt-get update" as a separate step
apt:
update_cache: yes
@brahimmachkouri
brahimmachkouri / fog-latest.sh
Last active February 14, 2022 13:32
Get the lastest version number of FogProject (or any Github Project)
#!/bin/bash
githubproject="https://github.com/FOGProject/fogproject/releases/latest/"
url=$(curl -Ls -o /dev/null -w %{url_effective} $githubproject)
version=${url##*/}
echo $version
@brahimmachkouri
brahimmachkouri / gen_autosigned_certificate.sh
Created February 14, 2022 13:30
Generate a self signed certificate without asking a passphrase for the private key
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 5000 -nodes
@brahimmachkouri
brahimmachkouri / install_node.sh
Created February 13, 2022 18:00
Node.js installation
#!/bin/bash
# Using Ubuntu
curl -fsSL https://deb.nodesource.com/setup_17.x | sudo -E bash -
sudo apt-get install -y nodejs
@brahimmachkouri
brahimmachkouri / gist:530b67f38f39fba52c8309abbaf080fa
Created November 9, 2021 11:19 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: