Skip to content

Instantly share code, notes, and snippets.

View nonsintetic's full-sized avatar

Octav Iosif nonsintetic

View GitHub Profile
@ilap
ilap / grafana_telegram_bot.md
Last active March 24, 2024 14:31
Grafana Telegram Alert

Config Telegrambot for grafana's alerts.

1. Create bot

Open Telegram and search for @BotFather user and message them the following:

You
/newbot 

BotFather
@TheDistantSea
TheDistantSea / version_compare.js
Created December 18, 2013 12:19
Function to compare two version strings (e.g. "1.6.1" is smaller than "1.7"). Developed in order to answer http://stackoverflow.com/a/6832721/50079.
/**
* Compares two software version numbers (e.g. "1.7.1" or "1.2b").
*
* This function was born in http://stackoverflow.com/a/6832721.
*
* @param {string} v1 The first version to be compared.
* @param {string} v2 The second version to be compared.
* @param {object} [options] Optional flags that affect comparison behavior:
* <ul>
* <li>
@nilliams
nilliams / node-openvg-particles.js
Created October 29, 2013 12:28
Simple particles example on the Raspberry Pi using node-openvg-canvas. Original demo code from thecodeplayer.com.
// Original Source
// http://thecodeplayer.com/walkthrough/make-a-particle-system-in-html5-canvas
//
// Modified to work with `node-openvg-canvas` on the Raspberry Pi
// - use RequestAnimationFrame instead of setInterval
// - correct the number of arguments in call to `ctx.arc()`
//
// Usage:
// - install Node.JS
// (refer to Installing Node section here: http://blog.rueedlinger.ch/2013/03/raspberry-pi-and-nodejs-basic-setup/)
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/