Skip to content

Instantly share code, notes, and snippets.

View mauron85's full-sized avatar

Marián Hello mauron85

View GitHub Profile
@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)"

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:

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);
#!/usr/bin/env bash
while true; do ps h -u nodejs -o pid,%cpu,%mem,rss,sz,vsz,cmd | awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'; sleep 30; done
@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
// you will need to run emailjs-tcp-socket server
// https://github.com/emailjs/emailjs-tcp-socket
// NODE_ENV=integration node ws-proxy/server.js
// Also for gmail turn on less secure app option
// https://www.google.com/settings/security/lesssecureapps
// In case cert is revoked/expired generate new cert
// https://support.google.com/a/answer/6180220?hl=en
// fill your gmail credentials and change ws-proxy url at very bottom