Skip to content

Instantly share code, notes, and snippets.

View CallumHoward's full-sized avatar
💻

Callum Howard CallumHoward

💻
  • SafetyCulture
  • Australia
View GitHub Profile
@CallumHoward
CallumHoward / Editor.jsx
Created September 23, 2022 06:50
Example JSX file
import React, { useEffect, useState } from "react";
export function Editor() {
const [state, setState] = useState([true, false, true]);
useEffect(() => {
const ydoc = new Y.Doc(); //create a ydoc
let provider = null;
try {
@CallumHoward
CallumHoward / .vimrc
Created October 8, 2021 00:52
Basic Vim configuration, place in home directory
filetype plugin indent on " Enabling filetype specific settings
syntax on
imap kj <Esc>
set number " Line numbers
set autoindent " Minimal automatic indenting for any filetype
set backspace=indent,eol,start " Proper backspace behavior
set incsearch " Incremental search highlighting
set wildmenu " Vim command line mode autocompletion
@CallumHoward
CallumHoward / sample.out
Created February 13, 2020 11:46
Sample of unresponsive Processing sketch process
Sampling process 6709 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling java (pid 6709) every 1 millisecond
Process: java [6709]
Path: /Applications/Processing.app/Contents/PlugIns/jdk1.8.0_202.jdk/Contents/Home/jre/bin/java
Load Address: 0x10ef23000
Identifier: net.java.openjdk.cmd
Version: 1.0 (1.0)
Code Type: X86-64
Parent Process: Processing [6704]
// boxit.cpp
// Callum Howard, 2019
#include <iostream>
//using namespace std;
// function prototype(s)
void check2();
@CallumHoward
CallumHoward / outline.md
Last active May 11, 2019 08:34
C++ Course
@CallumHoward
CallumHoward / escape_splitter.py
Last active January 19, 2019 22:56
Splitting escapes
# escape_splitter.py
# Callum Howard, 2019
escapes = {r'\a', r'\b', r'\f', r'\n', r'\r', r'\t', r'\v', r'\\', r"\'", r'\"', r'\?'}
def split_on_escape(input, prefix=''):
digraphs = [''.join(pair) for pair in zip(input, input[1:])]
for i, digraph in enumerate(digraphs):
if digraph in escapes:
return [prefix + input[:i]] + split_on_escape(input[i+2:], prefix=digraph)
// for.cpp
// Callum Howard, 2018
#include <iostream>
#include <vector>
class F {
public:
F() : mItems{3, 1, 4, 1, 5, 9, 2} {}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<title>Transparency Test</title>
<style>
div {
height: 100px;
xcodebuild -configuration Release
=== BUILD TARGET XVim2 OF PROJECT XVim2 WITH CONFIGURATION Release ===
Check dependencies
PhaseScriptExecution Write\ git\ revision build/XVim2.build/Release/XVim2.build/Script-ED1286541F90B268007B6FC7.sh
cd /Users/callumhoward/git/XVim2
export ACTION=build
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
// mergeSort.c
// Based on Sedgwick's code
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
typedef int Item;
// prototypes