View fabricjs_draw_rectangle.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>fabric Creating rect with a mouse</title> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<meta name="robots" content="noindex, nofollow"> | |
<meta name="googlebot" content="noindex, nofollow"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> |
View pmx-shutdown.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# get list of VMs on the node | |
VMIDs=$(/usr/sbin/qm list| awk '/[0-9]/ {print $1}') | |
# ask them to shutdown | |
for VM in $VMIDs | |
do | |
/usr/sbin/qm shutdown $VM | |
done |
View bytes2str.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xxd -ps -c 1 $1 | awk '{ print "0x" $0 }' ORS=',' | sed s/.$// && echo |
View GZLP01.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Maximum Health | |
003CC531 00000050 | |
Infinite Health | |
003CC533 00000050 | |
Never Lose Health | |
041F4A90 60000000 | |
Never Drown |
View install_latest_fusion_inventory.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
View front_matter_block_github_blog.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name front_matter_block_github_blog | |
// @namespace brahimmachkouri | |
// @version 0.1 | |
// @description Paste the "Front Matter" block for Github blogs : go in the edit post and CTRL-V | |
// @author Brahim Machkouri | |
// @include https://github.com/*/new/main/_posts | |
// @grant GM_setClipboard | |
// @match none | |
// ==/UserScript== |
View portainerv2-template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": [ | |
{ |
View tampermonkey_hm_xmlhttp_request_promise.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
View app.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tkinter import * | |
import webbrowser | |
class MyApp: | |
def __init__(self): | |
self.window = Tk() | |
self.window.title("My Application") | |
self.window.geometry("720x480") |
View nodejs.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- 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 |
NewerOlder