Skip to content

Instantly share code, notes, and snippets.

Tim J. Peters tim-peters

Block or report user

Report or block tim-peters

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@tim-peters
tim-peters / dyndns_update.sh
Last active Jan 22, 2019
Update SpDyn DynDNS (IPv6)
View dyndns_update.sh
#!/bin/bash
HOSTNAME=[url]
DYNDNSUSER=[email]
DYNDNSPW=[SpDyn token]
DYNDNSURL=https://update.spdyn.de/nic/update
CURRENT_IP6=$(ip address show dev wlan0 | grep ff:fe | grep -v fe80: | awk '{print $2}' | sed 's/^\([0-9a-f:]*\).*/\1/g')
DNS_IP6=$(host -t AAAA ${HOSTNAME} | tr " " "\n" | grep ff:fe)
@tim-peters
tim-peters / jpeg_corrupt.py
Created Dec 17, 2016
Python Script to find corrupted image files
View jpeg_corrupt.py
# Depends on
# * Python
# * Pillow (https://pypi.python.org/pypi/Pillow/3.4.2#downloads)
#
# Execute with
# http://superuser.com/questions/276154/automating-the-scanning-of-graphics-files-for-corruption
#
# Source
# http://superuser.com/questions/276154/automating-the-scanning-of-graphics-files-for-corruption
# --------------------
View keybase.md

Keybase proof

I hereby claim:

  • I am tim-peters on github.
  • I am tipe (https://keybase.io/tipe) on keybase.
  • I have a public key whose fingerprint is 5BE9 C46D EE41 3015 DE57 8233 98AB F7A5 161C FAEF

To claim this, I am signing this object:

@tim-peters
tim-peters / pathFinder_v2.pde
Created Dec 20, 2015
A very simple path finding algorythm in processing
View pathFinder_v2.pde
/*
* Processing 2.0 File
* Author: Tim J. Peters <tim-peters>
* Released under CC BY 3.0
*/
int dotSize = 100; // scale
int gridSize = 10; // size of the map (grid)
int[] waysToKnot;
@tim-peters
tim-peters / pathFinder_v1.pde
Last active Dec 13, 2015
A very simple path finding algorythm in processing
View pathFinder_v1.pde
/*
* Processing 2.0 File
* Author: Tim J. Peters <tim-peters>
* Released under CC BY 3.0
*/
int dotSize = 100; // scale
int gridSize = 10; // size of the map (grid)
int[] waysToKnot;
@tim-peters
tim-peters / diagonal-lsd-art.pde
Last active Dec 28, 2015
A dirty, short test of how to create diagonal animations in processing, depending on a n*m matrix.
View diagonal-lsd-art.pde
int width = 12; // Set amount of rectangles in a row
int height = 12; // Set amount of rectangles column
int outer_size = 70; // Set size of the (outer) rectangles
int inner_size = 100; // Set size of the rectangles/circles inside (must be smaller than outer_size!!!)
int marginX = 30; // Set margin between (outer) rectangles in a row (if you like)
int marginY = 30; // Set margin between (outer) rectangles in a column (if you like)
float animation_offset = -.48; // Set offset between rectangles anmiation
////////////////////////////////////
View primenumbers008.java
// List prime numbers with processing 2
// Simplified
// By: TiPE
int[] zahlen = new int[101]; // create an array width 101 "parts" called zahlen
int anzahl = 0; // create an int for counting the primes
for(int x=1;x<=100;x++) // count from 1 to 100...
{
You can’t perform that action at this time.