Skip to content

Instantly share code, notes, and snippets.

View meska's full-sized avatar
👽

Marco meska

👽
View GitHub Profile
@meska
meska / self_update.sh
Created April 18, 2016 09:47
Git self update
#!/usr/bin/env bash
# utilizzare con ./self_update.sh root_folder branch
# impostazioni
ROOT_FOLDER=$1
BRANCH=$2
cd $ROOT_FOLDER
# scarico l'ultima versione
@meska
meska / docker-machine-vmfusion.sh
Created April 6, 2016 10:00
Basic workflow for docker-machine on Mac with VMWare Fusion
# Get everything ready on a Mac
brew install docker docker-machine docker-compose
# Create a new machine (based on the 1.8.1 boot2docker iso)
docker-machine create --driver vmwarefusion --vmwarefusion-memory-size 2048 --vmwarefusion-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.9.1/boot2docker.iso osxdock
# Bring the machine up
docker-machine start osxdock
# Configure Shell
@meska
meska / README.md
Created March 13, 2016 23:57 — forked from nicerobot/README.md
Mac OS X uninstall script for packaged install of node.js

To run this, you can try:

curl -ks https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh | bash

I haven't tested this script doing it this way but i run a lot of my Gists like this so maybe this one'll work too.

Alternatively,

curl -ksO https://gist.githubusercontent.com/nicerobot/2697848/raw/uninstall-node.sh

chmod +x ./uninstall-node.sh

#!/bin/bash
# speedtest log with iftt maker
# requirements: pip install speedtest-cli
MAKER_KEY="XXXXXXXXXXXX"
RES=`speedtest-cli --simple 2>&1`
echo $RES
PING=`echo $RES | egrep -o 'Ping:\s\w+\.\w+' | egrep -o '\w+\.\w+'`
DOWNLOAD=`echo $RES | egrep -o 'Download:\s\w+\.\d+' | egrep -o '\w+\.\w+'`
UPLOAD=`echo $RES | egrep -o 'Upload:\s\w+\.\w+' | egrep -o '\w+\.\w+'`
# ==========================================================================
#
# ZoneMinder Wanscam Control Protocol Module, $Date: 2009-11-25 09:20:00 +0000 (Wed, 04 Nov 2009) $, $Revision: 0001 $
# Copyright (C) 2001-2008 Philip Coombes
# Modified for use with Foscam FI8918W IP Camera by Dave Harris
# Modified Feb 2011 by Howard Durdle (http://durdl.es/x) to:
# fix horizontal panning, add presets and IR on/off
# use Control Device field to pass username and password
# Modified June 5th, 2012 by Chris Bagwell to:
# Rename to IPCAM since its common protocol with wide range of cameras.
# ==========================================================================
#
# ZoneMinder FOSCAM version 1.0 API Control Protocol Module, $Date$, $Revision$
# Copyright (C) 2001-2008 Philip Coombes
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
@meska
meska / xbox.map
Created December 23, 2015 21:45
moonlight streamer xbox360 mapping
abs_deadzone = 0
abs_dpad_x = -1
abs_dpad_y = -1
abs_rx = 3
abs_ry = 4
abs_rz = -1
abs_x = 0
abs_y = 1
abs_z = -1
btn_dpad_down = 295
@meska
meska / xboxdrv
Created December 23, 2015 21:43
moonlight streamer xboxdrv /etc/default/xboxdrv
# How many Controllers? (support up to 4 Controllers)
CONTROLLER_NUM=1
case $CONTROLLER_NUM in
1) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button"
;;
2) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button"
;;
3) CONTROLLER="-w 0 -l 2 --trigger-as-button --dpad-as-button --next-controller -w 1 -l 3 --trigger-as-button --dpad-as-button --next-controller -w 2 -l 4 --trigger-as-button --dpad-as-button"
;;
@meska
meska / xboxdrv
Last active December 23, 2015 21:42
moonlight streamer xboxdrv startup script
#! /bin/bash
### BEGIN INIT INFO
# Provides: xbox-controller
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start XBOX Controller Service
# Description: Start the xboxdrv daemon with several options
# support up to 4 Controllers
@meska
meska / .bashrc
Last active December 23, 2015 21:44
moonlight streamer
if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then
echo "Connessione Remota"
else
echo "Connessione Locale Avvio Moonlight"
# sudo xboxdrv -D i 0 --next-controller -i 1 --next-controller -i 2 --next-controller -i 3 --deadzone 4000 --dbus disabled &
moonlight stream -mapping /home/pi/xbox.map -1080 -60fps
# moonlight map x.map
fi