Skip to content

Instantly share code, notes, and snippets.

View juzam's full-sized avatar

Giovanni Angoli juzam

  • Italia
View GitHub Profile
@juzam
juzam / hare.c
Created March 26, 2018 17:35 — forked from jpmens/hare.c
hare / hared
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <memory.h>
#include <sys/socket.h>
/*
@juzam
juzam / wifi_positioning_system.py
Created January 8, 2017 11:56 — forked from initbrain/NOTICE.md
Python Wi-Fi Positioning System, use Google Maps Geolocation API, tested on GNU/Linux (require iw) and Mac OS X (require airport), special thanks go to contributors!
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# Julien Deudon (initbrain) - 20/03/2012
# modified to run on OS X by James Armitage - 25/06/2012
# modified to process in python by Dan Gleebits - 26/06/2012
# modified to parse the xml output of airport by Vincent Ohprecio - 01/10/2012
# modified to work with the new Google geolocation API by Giovanni Angoli (juzam) - 03/01/2017
# merging all modifications by Julien Deudon (initbrain) - 06/01/2017
from commands import getoutput, getstatusoutput
@juzam
juzam / rPi3-ap-setup.sh
Last active April 18, 2016 10:20 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Must be root"
exit
fi
if [[ $# -ne 1 ]]; then
echo "You need to set a password!"
echo "Usage:"
#!/bin/bash
### BEGIN INIT INFO
# Provides: node-red
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start or stop the node-red server
### END INIT INFO
# Can be downloaded and installed in one go by using this command
#! /bin/sh
# Starts and stops node-red
# /etc/init.d/node_red
### BEGIN INIT INFO
# Provides: node_red
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Node Red
#!/usr/bin/env python
from datetime import timedelta, tzinfo
from dateutil import tz
from shlex import split
from subprocess import Popen, PIPE
import os
import plistlib
NOT_ENABLED = u'Not enabled.'