Skip to content

Instantly share code, notes, and snippets.

View CallumHoward's full-sized avatar
💻

Callum Howard CallumHoward

💻
  • SafetyCulture
  • Australia
View GitHub Profile
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include "Graph.h"
bool isAdjacentEdge(Edge a, Edge b);
bool isPath(Edge path[], int pathSize);
bool hasDuplicates(Edge edges[], int numEdges);
bool sameEdge(Edge a, Edge b);
// allEven.c
// Callum Howard, 2017
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
// function prototypes
bool allEven(int numbers[], int left, int right);
bool isEven(int input);
@CallumHoward
CallumHoward / InputAnalyzerApp.cpp
Last active December 15, 2017 05:42
Cinder Input Analyzer Sample
/*
* This sample illustrates how to get audio data from an input device, such as a microphone,
* with audio::InputDeviceNode. It then visualizes the input in the frequency domain. The frequency
* spectrum analysis is accomplished with an audio::MonitorSpectralNode.
*
* The plot is similar to a typical spectrogram, where the x-axis represents the linear
* frequency bins (0 - samplerate / 2) and the y-axis is the magnitude of the frequency
* bin in normalized decibels (0 - 100).
*
* author: Richard Eakin (2014)
@CallumHoward
CallumHoward / List.c
Created December 14, 2017 23:25
Linked List (no head/rep)
// List.c
// Callum Howard, 2017
#include <stdio.h>
#include <stdlib.h>
#include "List.h"
typedef struct _node *NodePointer;
typedef struct _node {
+ verbose=on
+ shift
+ [[ -n '' ]]
+ get_distro
+ get_bold
+ case "$ascii_bold" in
+ ascii_bold='\033[1m'
+ case "$bold" in
+ bold='\033[1m'
+ get_distro_colors
+ verbose=on
+ shift
+ [[ -n '' ]]
+ get_distro
+ get_bold
+ case "$ascii_bold" in
+ case "$bold" in
+ get_distro_colors
+ case "$ascii_distro" in
+ set_colors 2 1
@CallumHoward
CallumHoward / main.rs
Created June 28, 2017 23:28
prints all directories recursively
extern crate ignore;
fn main() {
use ignore::{WalkBuilder, WalkState};
WalkBuilder::new("./").build_parallel().run(|| {
Box::new(move |result| {
let dent = match result {
Err(_) => return WalkState::Continue,
@CallumHoward
CallumHoward / ys.zsh-theme
Created June 16, 2017 07:32
modified ys theme for oh-my-zsh
# Clean, simple, compatible and meaningful.
# Tested on Linux, Unix and Windows under ANSI colors.
# It is recommended to use with a dark background and the font Inconsolata.
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white.
#
# http://ysmood.org/wp/2013/03/my-ys-terminal-theme/
# Mar 2013 ys
# Machine name.
function box_name {
#include <stdlib.h>
#include <stdio.h>
#include "list.h"
// NULL: a special value we can store
// in a pointer that indicates that
// it refers to nothing
// helper function prototypes
struct node *new_node(int data, struct node *next);
# sort_sequences.py
# Callum Howard, 2017
from itertools import permutations, combinations
def compswap(swap, inputs):
if (inputs[swap[0]] > inputs[swap[1]]):
inputs[swap[0]], inputs[swap[1]] = inputs[swap[1]], inputs[swap[0]]
return inputs