Skip to content

Instantly share code, notes, and snippets.

View markruys's full-sized avatar

Mark Ruys markruys

  • Peercode
  • The Netherlands
View GitHub Profile
@SupraJames
SupraJames / arp_responder.py
Created January 11, 2018 10:42
ARP responder using Python / scapy
# Horrible bodge for when ESP82xx devices are not responding to ARP requests any more.
# This script can run anywhere on the subnet. It listens for ARP requests and responds
# with the MAC address in macDict based on the IP address.
#
# Note that it will ONLY respond if the IP address is found in macDict below.
#
# Please be careful with this tool. If wrongly configured, network breakage could occur.
#
# Requires scapy (pip install scapy) and tcpdump. Running tcpdump usually requires root
# so this script will need to be run as root.
@dawsontoth
dawsontoth / InfiniteScrollableView.js
Created February 3, 2011 20:54
Infinite scrollable list.
/**
* We're going to create an infinite scrollable list. In this case, we're going to show a date. When you swipe left,
* you'll see yesterday. Then the day before yesterday, and so on. Swiping right shows you tomorrow, and so on.
*/
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var isAndroid = Ti.Platform.osname === 'android';
/**
* Track where we are in the infinite scrollable views, and define how large of a step goes between each view.
*/
var currentDate = new Date(), msIntervalBetweenViews = 1000/*ms*/ * 60/*s*/ * 60/*m*/ * 24/*h*/;