Skip to content

Instantly share code, notes, and snippets.

View eyenx's full-sized avatar

Toni Tauro eyenx

View GitHub Profile
  • Shall i implement it?
  • No ...
@cherti
cherti / alert.sh
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
#!/bin/bash
# Base name of the planets to pick a random one later
# Website to convert strings: http://delim.co/
PLANET_BASENAME=(Acheloos Agamemnon Agenor Aigisthos Aine Airmid Aizen-Myoo Aji-Suki-Taka-Hi-Kone Akea Aletheia Alkmene Am-No-Tanabata-Hime Ama-No-Minaka-Nushi Ama-Tsu-Mara Amaethon Amaterasu Amatsu Amatsu-Kami Amazonen Ame-No-Mi-Kumari Ame-No-Wakahiko Amida Amphitryon Andromeda Anemoi Angus Anu Apollo Apukohai Arachne Arawn Ariadne Arianrhod Artio Asklepios Atalanta Babd Bacchus Baku Balor Bel Bellerophon Bellona Benten Benzai-Ten Bimbogami Binzuru-Sonja Bishamon Blodeuwedd Bosatsu Bran Branwen Brighid Bris Butsu Camalus Ceres Cerridwen Cerunnos Charon Chien-Shin Chimata-No-Kami Chup-Kamui Cupid Cyhiraeth Dagda Daibosatsu Daidalos Daikoku Dainichi Danaiden Danu Deukalion Dewi Diana Diancecht Dioskuren Don Dosojin Dozoku-Shin Druantia Dylan Ebisu Ekibiogami Elaine Elektra Emma-O Europa Eurystheus Faunus Flidais Flora Fudo Fujin Fukurokuju Funadama Futsu-Nushi-No-Kami Gama Gekka-O Giobhniu Gwydion
@umbruch
umbruch / go
Last active August 9, 2016 15:11
go script for mac users which opens ssh connection to the mapped server in the config file
#############################################################################
# Scriptname: go
# Author: Sven Lauber, IT261
# Date: 10.12.2014
# Desc: open terminal tabs with bashcompletion for MAC users only!!
# Configfile: /Users/$USER/.server.list
#############################################################################
#!/bin/bash
### Envoirement
@renchap
renchap / README.md
Last active February 14, 2025 13:25
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {
@analytically
analytically / gist:1a6bdcfa711474d7ba24
Last active November 1, 2021 20:01
Ubuntu 14.04 AWS EC2 cloud-init (Kernel 3.18+NTP+ixgbevf+Docker+Route53) - to be used with ami-870a2fb7 and newer instance types (eg. t2, m3, c3, r3)
#!/bin/bash
set -e
sudo rm -f /etc/update-motd.d/10-help-text
sudo rm -f /etc/update-motd.d/51-cloudguest
sudo rm -f /etc/update-motd.d/91-release-upgrade
echo -e "[sysinfo]\nexclude_sysinfo_plugins = LandscapeLink" | sudo tee /etc/landscape/client.conf
echo deb https://get.docker.com/ubuntu docker main | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
@willurd
willurd / web-servers.md
Last active April 8, 2026 23:17
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@mbrochh
mbrochh / gist:964057
Last active November 10, 2021 19:08
Fast Forward Your Fork
# kudos to https://github.com/drewlesueur
# stolen from here: https://github.com/blog/266-fast-forward-your-fork#comment-11535
git checkout -b upstream-master
git remote add upstream git://github.com/documentcloud/underscore.git
git pull upstream master
git checkout master // [my master branch]
git merge upstream-master
git push origin master