This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Uses wttr.in to display weather in terminal | |
# Low values of `r` are rude. Don't overload wttr.in | |
# -l is location as postcode, airport code, or location name. IE ADL, Port Adelaide, 5014+SA | |
# -r is refresh rate in minutes. You do not need minute by minute updates. | |
# -b is blanking. Will blank out the terminal at the begining of each update if set. | |
usage() { echo "Usage: $0 [-l <location>] [-r <refresh rate>] [-b]" 1>&2; exit 1; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myhistory = fb.ProfilePath + "np.txt"; | |
var maxfilesize = 5242880; //5MB in bytes | |
if (utils.IsFile(myhistory) == false) { | |
utils.WriteTextFile(myhistory, ""); | |
} | |
function save_history() { | |
var fsize = utils.GetFileSize(myhistory); | |
if (fsize < maxfilesize) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$startTime = microtime(); | |
# config | |
$dir = './'; // path to folder of images | |
$recursive = true; // scan all folders in selected path, recursively | |
$imageExtensions = array('jpg', 'png', 'gif', 'jpeg'); // the image types you want to display | |
$perPage = 16; // how many images to show per page (multiple of 4 recommended) | |
$showFileInfo = true; // display file information beneath the image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Function to display rotated characters | |
// on a 7 segment display to go with TM1637Display | |
// | |
// Usage: | |
// dispArr(int[0,4]); | |
// | |
// eg: | |
// dispArr(104); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# rotates a character map for an 8 segment display so | |
# that you can generate a character map for an | |
# upside down display. | |
# | |
# Used to make a header, kept in case I need to rotate something else? | |
#my @map = (0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7f, 0x7C, 0x39, 0x58, 0x3f, 0x5E, 0x79, 0x71, 0x7d, 0x76, 0x74, 0x06, 0x1f, 0x76, 0x38, 0x06, 0x54, 0x3f, 0x5c, 0x73, 0x50, 0x6d, 0x3e, 0x3e, 0x66, 0x5b, 0x40, 0x08, 0x00); | |
my %map = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>tempal up</title> | |
<script> | |
// Set this to the destination host | |
var host = '//paste.bin'; | |
// Set this to the destination host name | |
// ie "tempal" for temp.al | |
var name = 'tempal'; | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$error = $_SERVER['REDIRECT_STATUS']; | |
$page = $_SERVER['REDIRECT_URL']; | |
$email = 'Your email here'; | |
/* Alias for apache httpd conf | |
Alias "/error" "/var/www/html/error_page.php" | |
*/ |