Skip to content

Instantly share code, notes, and snippets.

View unixfox's full-sized avatar

Émilien (perso) unixfox

View GitHub Profile
@hpherzog
hpherzog / jessie-mongodb-3-0-x.sh
Created September 13, 2015 11:34
Install mongodb version 3.0.x on debian jessie
#!/bin/sh
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://repo.mongodb.org/apt/debian wheezy/mongodb-org/3.0 main" | tee /etc/apt/sources.list.d/mongodb-org-3.0.list
apt-get update
apt-get install -y mongodb-org
@dobaduc
dobaduc / aliyuncli-ecs.md
Last active September 4, 2018 12:36
Getting started with Aliyun ECS API

Installation

Check out the guideline here: https://github.com/aliyun/aliyun-cli ( using Google translator)

Install python pip if necessary

curl https://bootstrap.pypa.io/get-pip.py | sudo python

Install aliyuncli

@brianclemens
brianclemens / sudoers.lecture
Created July 8, 2017 04:04
hardcore sudo lecture
 "Bee" careful __
with sudo! // \
\\_/ //
''-.._.-''-.._.. -(||)(')
'''
@0x63lv
0x63lv / hex_to_str.py
Last active August 14, 2019 16:48 — forked from vigneshwaranr/migrator.sh
Script to convert Grafana SQLite dumps into PostgreSQL compatible dumps, and import it into PostgreSQL
#!/bin/env python
import fileinput
import re
import binascii
for line in fileinput.input(inplace = 1):
if re.search('X\'([a-fA-F0-9]+)\'', line) is not None:
unhexed_string = binascii.unhexlify(re.search('X\'([a-fA-F0-9]+)\'', line).group(1))
unhexed_string = unhexed_string.replace("'", "''")
@stefanbirkner
stefanbirkner / nexusdeb.sh
Last active October 27, 2020 17:30
Nexusdeb build a debian package of the Nexus server.
#!/bin/bash
# nexusdeb builds a debian package of the Nexus repository manager. nexusdeb
# downloads nexus by itself. You run it by
# nexusdeb.sh <version> <maintainer>
# Example:
# nexusdeb.sh 2.0.5 "Denny Colt <d.colt@eisner.qcg>"
#
# The script has been tested with version 2.0.5.
if [ -z $1 ]
@denisu
denisu / fastly.txt
Created June 18, 2017 21:08
Fastly IPv6 Hosts
2a04:4e42::1 5742636757417984-fe1.pantheonsite.io
2a04:4e42::2 5724160613416960-fe2.pantheonsite.io
2a04:4e42::3 5746821397741568-fe3.pantheonsite.io
2a04:4e42::4 5714315743068160-fe4.pantheonsite.io
2a04:4e42::72 *.avvosites.com
2a04:4e42::74 www.aclu.org
2a04:4e42::78 *.twimg.com
2a04:4e42::79 *.wixstatic.com
2a04:4e42::80 admin.wes.bibbed.org
2a04:4e42::81 www.bbc.com
@arches
arches / Procfile
Last active February 16, 2021 10:44
A little hack to restart Heroku web dynos when they hit 1000MB of memory
monitor: bundle exec ruby monitor.rb
#!/bin/bash
# Prerequisites: http://wiki.openwrt.org/doc/howto/buildroot.exigence
# Additionally JDK is needed
generate_buildenv() {
# Prepare build enviroment
mkdir lede_build
cd lede_build
git clone https://github.com/lede-project/source.git
/*
EXAMPLE MESSAGE
/poll "question?" "option 1" "option 2"
*/
/** Global Helpers
*
* console - A normal console instance
* _ - An underscore instance
@mpochron
mpochron / jail.local
Last active November 1, 2021 00:19
Maltrial - integration with Fail2ban
; /etc/fail2ban/jail.local
[maltrail-iptables]
enabled = true
filter = maltrail
bantime = 31536000
action = iptables-allports[name=MALTRAIL, protocol=all]
;action = vesta[name=MALTRAIL]
echo "logpath = /var/log/maltrail/$(ls -1t /var/log/maltrail | grep -E '^[^error.log]' | head -1)"
maxretry = 1