Skip to content

Instantly share code, notes, and snippets.

View wiredmax's full-sized avatar
👨‍🚀
Hack the Planet!

Maxime Poulin wiredmax

👨‍🚀
Hack the Planet!
View GitHub Profile
@wiredmax
wiredmax / route53_dyndns.sh
Created December 29, 2022 02:09
Dynamics DNS script for Route53
#!/bin/sh
IP="$(curl -s https://checkip.amazonaws.com/)"
ZONEID="AWSZ0N3IDH3R3"
DOMAIN="subdomain.example.com"
DNS="$(mktemp)"
cat > "${DNS}" <<EOF
{
@wiredmax
wiredmax / mongodb-s3-backup.sh
Last active January 1, 2018 19:13 — forked from eladnava/mongodb-s3-backup.sh
Automatically backup a MongoDB database to S3 using mongodump, tar, awscli and twilio API SMS notification (Ubuntu 16.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Fill Twilio twilio configuration
# 6) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 7) Run chmod +x backup.sh

Keybase proof

I hereby claim:

  • I am wiredmax on github.
  • I am maximepoulin (https://keybase.io/maximepoulin) on keybase.
  • I have a public key ASCXYcB7YC8kgBwijp4-IeeD2f63n4wmUVRDs2Pk_blM1Ao

To claim this, I am signing this object:

@wiredmax
wiredmax / jsx-highlighting-issue.jsx
Created August 17, 2016 14:05
jsx-highlighting-issue
<div>
<RaisedButton
icon={<ShoppingCart />}
label="Opportunité de vente"
style={{
marginLeft: 0
}}
primary
onTouchTap={this.handleToggleODVForm}
/>
@wiredmax
wiredmax / server.js
Created September 16, 2014 23:08
Simple NodeJS proxy server
var http = require('http'),
httpProxy = require('http-proxy');
//
// Create a proxy server with custom application logic
//
var proxy = httpProxy.createProxyServer({});
//
// Create your custom server and just call `proxy.web()` to proxy
@wiredmax
wiredmax / google-geocoder.html
Created July 24, 2014 17:17
Google Geocoder APIv3
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Geocoding service</title>
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
wget https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install
@wiredmax
wiredmax / bootstrap-xl.less
Last active June 15, 2020 20:55
XL for Bootstrap 3
// XL for Bootstrap 3
// Huge screen / massive desktop
// Inspired from: https://github.com/christhomas/bootstrap/commit/09c94ab34a497785f3112a5951f225c21aec6aaa
// Note: whoever didn't think of this in bootstrap needs slapping
@screen-xl: 1600px;
@screen-xl-min: @screen-xl;
@screen-xl-desktop: @screen-xl-min;
@screen-lg-max: (@screen-xl-min - 1);
#!/bin/bash
### BEGIN INIT INFO
# Provides: redis sentinel
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Starts redis sentinel
# Description: Starts redis sentinel using start-stop-daemon
### END INIT INFO
@wiredmax
wiredmax / redis.conf
Created June 3, 2013 15:51
Minimal configuration file to start a redis cluster node instance (2.9.10)
port 6379
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5
appendonly yes