Skip to content

Instantly share code, notes, and snippets.

View mauron85's full-sized avatar

Marián Hello mauron85

View GitHub Profile
services:
#sets up how to make the source data available
demo:
tms:
origin: nw
wms:
#srs sets the coordinate reference systems as which you want to make your data available. MapProxy reprojects the source data very well to these projections.
srs: ['EPSG:900913','EPSG:3857']
image_formats: ['image/jpeg', 'image/png']
md:
require.config({
// enforceDefine: true,
// urlArgs: 'bust=' + (new Date()).getTime(),
waitSeconds: 3,
paths: {
'text': '../components/requirejs-text/text',
'classes': '../scripts/classes',
'jquery': '../components/jquery/jquery',
'jquery.mobile': '../components/jquery-mobile/jquery.mobile',
'jquery.mobileConfig': '../scripts/jquery.mobileConfig',
@mauron85
mauron85 / ipfilter-update
Created June 8, 2013 15:33
OS X version of ipfilter.dat updater
#!/bin/bash
url="http://tbg.iblocklist.com/Lists/ipfilter.dat.gz"
tempDirectory="/tmp"
fileDirectory="/usr/local/var/ipfilter"
tgzfile=$(basename $url)
NAME=$(basename $0)
#get local
<html>
<head>
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="http://underscorejs.org/underscore.js"></script>
<script src="http://backbonejs.org/backbone.js"></script>
<script>
var Friend = Backbone.Model.extend({
move: function(pos) {
this.set('pos', pos);
@mauron85
mauron85 / randomizemac.sh
Last active August 29, 2015 14:02
Randomize MAC Address
#!/bin/bash
#inspired from: http://osxdaily.com/2012/03/01/change-mac-address-os-x/
mac_add=$(openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//')
sudo ifconfig en0 ether $mac_add
echo "Your you MAC address is: $(ifconfig en0 |grep ether)"
@mauron85
mauron85 / proxytransparent,sh
Created June 6, 2014 13:28
Global OSX system level transparent proxy using redsocks
#!/bin/bash
redsocks -c /usr/local/etc/redsocks.conf
sudo ipfw add 100 fwd 127.0.0.1,12345 dst-port 80
sudo ipfw add 100 fwd 127.0.0.1,12345 dst-port 443
#/bin/bash
sudo networksetup -setdnsservers Wi-Fi 208.67.222.222 208.67.220.220
sudo networksetup -setdnsservers 'USB 2.0 10/100M Ethernet Adaptor' 208.67.222.222 208.67.220.220

Keybase proof

I hereby claim:

  • I am mauron85 on github.
  • I am finch (https://keybase.io/finch) on keybase.
  • I have a public key whose fingerprint is 8A69 A414 9931 6F08 C918 A486 F35B 68EE 11C2 887E

To claim this, I am signing this object:

@mauron85
mauron85 / nginx-lang.lua
Last active September 3, 2023 06:31
Detect preferred language script for Nginx written in LUA
-------------------------------------------------------------------------------
-- HTTP Accept-Language header handler --
-- @originalAuthor: f.ghibellini@gmail.com --
-- @originalRepository: https://github.com/fghibellini/nginx-http-accept-lang--
-- @modifiedBy: marian.hello@mapilary.com --
-- @gist: https://gist.github.com/mauron85/47ed1075262d9e020fe2 --
-- @license: MIT --
-- @requires: --
-- @description: --
-- returns language with greatest quality --
@mauron85
mauron85 / letsencrypt-cert
Last active March 9, 2021 03:20
Auto refresh LetsEncrypt cert for NGINX with letsencrypt-auto
#!/bin/bash
echo "Running as user $USER"
DIR=/home/letsencrypt/letsencrypt
DOMAIN=mydomain.com
$DIR/letsencrypt-auto -a webroot --webroot-path /home/letsencrypt/webroot/ \
--config-dir /home/letsencrypt/etc \
--logs-dir /home/letsencrypt/log \