Skip to content

Instantly share code, notes, and snippets.

View matthewpalmer's full-sized avatar

Matthew Palmer matthewpalmer

View GitHub Profile
@matthewpalmer
matthewpalmer / hello.php
Created July 21, 2018 04:06
php hello world
<html>
<head>
<title>PHP Hello World!</title>
</head>
<body>
<?php echo '<h1>Hello World</h1>'; ?>
<?php phpinfo(); ?>
</body>
</html>
@matthewpalmer
matthewpalmer / pod.yaml
Created June 9, 2018 21:23
Example Kubernetes YAML for the multi-container adapter design pattern
# Example YAML configuration for the adapter pattern.
# It defines a main application container which writes
# the current date and system usage information to a log file
# every five seconds.
# The adapter container reads what the application has written and
# reformats it into a structure that a hypothetical monitoring
# service requires.
@matthewpalmer
matthewpalmer / pod.yaml
Last active July 21, 2023 04:54
Example Kubernetes pod for the multi-container sidecar design pattern
# Example YAML configuration for the sidecar pattern.
# It defines a main application container which writes
# the current date to a log file every five seconds.
# The sidecar container is nginx serving that log file.
# (In practice, your sidecar is likely to be a log collection
# container that uploads to external storage.)
# To run:
@matthewpalmer
matthewpalmer / Locksmith-Test.swift
Created June 27, 2015 00:39
Swift 2.0 tests for Locksmith
//
// LocksmithDemoTests.swift
// LocksmithDemoTests
//
// Created by Matthew Palmer on 27/06/2015.
// Copyright © 2015 Matthew Palmer. All rights reserved.
//
import XCTest
["Stone Baked Turkish Rolls 3 pack","Stone Baked Pane Di Casa Rolls 4 pack","Rustic Rolls 4 pack","White Sourdough Vienna 550g","Stone Baked Multigrain Sourdough Cobb 500g","Stone Baked Light Rye Sourdough Vienna 550g","Stone Baked Pane Di Casa 500g","Stone Baked Kalamata Olive Batard 300g","Sunflower Triangle Rolls 4 pack","Stone Baked Turkish Bread 400g"]
@matthewpalmer
matthewpalmer / Podcast Method #6.md
Created January 28, 2015 01:03
Podcast Method Episode #6 – Hijacking – Time-stamped show notes.md

Podcast Method Episode #6 – Hijacking – Time-stamped show notes

  • 00:55 – Reworking and editing an interview after it's happened
  • 02:45 – Doing sponsor reads before, during, or after an interview
  • 09:55 – Tracking podcast download statistics
  • 11:30 – Showbot, recording live, chatrooms
  • 15:00 – Collecting topic suggestions from listeners
  • 16:30 – Microphones for screencasts—dynamic vs condensor—and tips for screencasting
  • 22:40 – Noise gating
  • 25:15 – Mini Skype machines
{-
rkat / FFT.hs
Created on Apr 9, 2012
https://gist.github.com/rkat/2341767
-}
module FFT ( fft
) where
import Data.Complex
module Spectrum ( computeSpectrum
, sumSpectrum
) where
import Data.Complex
{-
N samples
R sample rate
module Plot (Plot.plot)
where
import Graphics.Rendering.Chart.Easy
import Graphics.Rendering.Chart.Backend.Cairo
import Data.Complex
import Spectrum
-- An artificial max to make sure all graphs are the same height
maxHeight = 25000
import Data.Complex
import Data.List
import Foreign.Marshal.Array
import RTLSDR
import FFT
import Plot
import Spectrum
bufSize = 512
sampleRate = 1280000