Skip to content

Instantly share code, notes, and snippets.

View josePhoenix's full-sized avatar

Joseph Long josePhoenix

View GitHub Profile
@josePhoenix
josePhoenix / despoof.sh
Created December 6, 2011 03:49
Spoof and despoof your MAC address
#!/bin/bash
# Return your MAC address to its hardware default
ORIGINAL="XX:XX:XX:XX:XX:XX"
echo "Hardware MAC address: $ORIGINAL"
echo -n "Current MAC address: "
ifconfig en1 | grep ether
echo -n "Dissociating from all networks.. "
sudo airport -z && echo "done"
echo -n "Resetting MAC address to $ORIGINAL.. "
sudo ifconfig en1 ether $ORIGINAL && echo "done"
@josePhoenix
josePhoenix / gist:6208104
Last active December 20, 2015 22:49
Tricks.
# only use pager if output > terminal height
git config --global core.pager "less -F -X"
# color ls output
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# or for a black bg
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
# color git (including diffs)
@josePhoenix
josePhoenix / aperture.pro
Created September 26, 2013 23:03
IDL code to compute a diffraction pattern (and a Python port)
; Test routine to generate a circular pupil and compute the
; PSF and OTF associated with it.
pro aperture,nd,rado,radi,flag
;nd - array size
;rado - outer radius (pixels)
;radi - inner radius (pixels)
;flag - 0 - circular aperture
; - 1 - square aperture
dm_pos_20130522_232523.tel
dm_pos_20130522_232814.tel
dm_pos_20130522_233104.tel
dm_pos_20130522_233126.tel
dm_pos_20130627_004015.tel
dm_pos_20130627_004125.tel
dm_pos_20130627_005708.tel
dm_pos_20130627_005824.tel
dm_pos_20130701_162728.tel
dm_pos_20130701_162844.tel
20:22:38 Loki:Telemetry josephoenix$ du -h dm_pos_20130731_*
8.0K dm_pos_20130731_014128.tel
4.0K dm_pos_20130731_014155.tel
8.0K dm_pos_20130731_014331.tel
8.0K dm_pos_20130731_014613.tel
3.6M dm_pos_20130731_014628.tel
8.0K dm_pos_20130731_014758.tel
4.0K dm_pos_20130731_014824.tel
16K dm_pos_20130731_014833.tel
2.3M dm_pos_20130731_014903.tel
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
color c = color(255, 204, 0);
float rect_theta = 0.25;
void setup() {
size(300, 300);
fill(c);
}
void draw() {
for (float step = 0; step < TWO_PI; step += 0.01) {
point(50*cos(step) + 150, 100*sin(step) + 150);
/*
*
* Arbitrary Polygons with tfpractice
*
*/
class Polygon {
float x, y;
int numSides;
float r;
"""
This is a modified version of source code from the Accerciser project
(http://live.gnome.org/accerciser).
Backend to the console plugin.
@author: Eitan Isaacson
@organization: IBM Corporation
@copyright: Copyright (c) 2007 IBM Corporation
@license: BSD
2013-12-17 02:43:22.089911 28509 18000 29542 19718 26820 36064 30728 21982 29769 29608 18000 31509 18000 30095 18000 28065 34879 28982 33048 29668 31634 19560 28934 36723 30510 18000 31064 29927 28886 31345 29646 29325 47842 18942 23363 28677 26016 29833 18000 18000 28698 31890 28311 18000 28639 25539 18000 34266 27579 29275 18000 28659 18000 29257 30288 32162 26474 27854 32175 43371 30630 18000 27893 24345 18000 31527 30998 32365 28248 18000 18000 27938 41629 31034 18000 29035 27132 27910 18000 18000 27753 30376 29421 26342 18000 18000 31598 18000 33603 18000 31288 28314 18000 31004 18000 28596 26018 31330 18000 18000 28947 33028 25665 31101 18000 24965 33494 32029 27732 18000 31039 28656 39710 31366 18000 28718 28423 34585 33383 18000 29392 32420 30347 18000 18000 30236 33309 33476 40488 18000 31133 28843 31359 20162 18000 30007 29743 27590 31841 18000 27994 18000 28821 25765 36830 33749 31592 30632 26936 26000 33850 27509 42559 31677 65535 29555 33465 28825 26111 26000
2013-12-17 02:43:22.094919 28077 180