Skip to content

Instantly share code, notes, and snippets.

@Cale
Cale / transmit-aprs-packet.php
Last active January 16, 2018 03:07
Encode an APRS packet to a wave file which is then played through standard audio out.
<?php
/* This script encodes an APRS packet to a wave file which is then played
through standard audio out. Connect your audio out to a VOX enabled
transceiver to transmit the packet. Your audio output level should
be rather high for VOX.
The following AFSK/APRS Python library is required:
https://github.com/casebeer/afsk (pip install afsk).
PyAudio not required.
*/
@Cale
Cale / aprs-position-beacon.php
Last active February 1, 2021 23:11
This script reads gpsd information and outputs a sound file containing an APRS position message.
<?php
/* Requirments include gpsd with a local websever serving up
https://raw.githubusercontent.com/yazug/gpsd/master/gpsd.php.in.
In addition, the following AFSK/APRS python library is required:
https://github.com/casebeer/afsk (pip install afsk)
PyAudio not required.
*/
function process_gps() {
@Cale
Cale / responsive-html-email-template
Created August 26, 2014 15:18
Responsive HTML email template
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
@media screen and (max-width: 480px) {
/* Keep iOS Mail from auto adjusting text-size */
html { -webkit-text-size-adjust: none; }

Keybase proof

I hereby claim:

  • I am cale on github.
  • I am cale (https://keybase.io/cale) on keybase.
  • I have a public key whose fingerprint is 7D46 0DB7 CB5E C54E 4BB2 F0F2 C001 C8CE 8D7F BEAF

To claim this, I am signing this object:

@Cale
Cale / generate_emails.php
Created January 10, 2012 22:19
Write x number of random email addresses to file
<?php
// This script generates x number of random email addresses
// and outputs them to a CSV file.
// Modified version of http://www.laughing-buddha.net/php/email
// Number of emails you'd like to generate
$count = 13575;
// Open the file we're outputing to. (This file should exist before you run the script.)
$fp = fopen('emails.csv', 'w');
@Cale
Cale / poormans-propane
Created July 13, 2011 15:06
Poorman's Propane
Add this to your bookmark bar. Clicking will hide all images on a page.
javascript:(function(){var imgs=document.getElementsByTagName("img");for(var i=0;i<imgs.length;i++)imgs[i].style.visibility="hidden"}());
// include the library code:
#include <LiquidCrystal.h>
#include <WString.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(2, 3, 4, 9, 10, 11, 12);
void setup(){
// set up the LCD's number of rows and columns:
analogWrite(5, 100);
development:
adapter: sqlite3
dbfile: db/development.sqlite3
NoMethodError in Home#index
Showing app/views/home/index.haml where line #7 raised:
undefined method `gravatar_for' for #<ActionView::Base:0x219e1a8>
Extracted source (around line #7):
4: = logged_in?
5: %p
6: - if logged_in?