Skip to content

Instantly share code, notes, and snippets.

@vipyne
vipyne / commit-msg
Created May 22, 2020 23:16
commit-msg git hook for @daily-co/daily-js - enforces conventional commit message syntax (add to .git/hooks/ in local repo)
#!/bin/sh
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
function reject()
{
echo
echo ">>> Seems like this commit message isn't conventional <<<"
@vipyne
vipyne / stupidbashtricks.sh
Last active April 21, 2021 00:49
stupid bash tricks - macos / bsd flavored
##### PLAY ALL THE SOUNDS #####
## https://ss64.com/osx/afplay.html
musicafast ()
{
echo "find / -type f -name "*.aif" -o -name "*.mp3" 2>/dev/null |xargs -I % afplay % -r 7"
find / -type f -name "*.aif" -o -name "*.mp3" 2>/dev/null |xargs -I % afplay % -r 7
}
##### ANNOY SOMEONE ELSE #####
$ export PS1=$PS1'\a'
@vipyne
vipyne / synthwave.tmTheme
Created November 7, 2019 22:45
sublime text synthwave color scheme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>vanessa pyne</string>
<key>name</key>
<string>synthwave</string>
<key>settings</key>
<array>
@vipyne
vipyne / stalktrace.js
Last active October 25, 2019 19:18
Proxies + stack traces = log all the things
Error.stackTraceLimit = Infinity;
function StalkTrace() {
this.name = '';
Error.captureStackTrace(this, StalkTrace);
}
function proxify(target, handler) {
if ("object" === typeof target ||
"function" === typeof target) {
@vipyne
vipyne / cleanupbranches.sh
Last active April 27, 2021 17:40
Iterate through local git branches and choose whether or not to delete
#! /usr/bin/env bash
echo "*** CLEAN UP BRANCHES ***"
echo
git branch
echo
branches=$(git branch)
IFS="
@vipyne
vipyne / node_module_template.sh
Created July 20, 2017 19:37
Bash script to generate a Node Module template.
#!/usr/bin/env bash
##
# author: @vipyne
# date: 2017-07-20
#
# usage:
# $ ./node_module_template <module name> <github username> <"Module description."> [create repo and push to github - leave blank if NO]
#
# TODO: add more robust error handling
@vipyne
vipyne / output.txt
Created November 18, 2016 19:28
implementation of stack data structure in C
vipyne $ gcc stacksonstacksonstacks.c -o stack
vipyne $ ./stack 4 7 2 58
push 4
4, push 7
7, push 2
2, push 58
58,
pop 58
pop 2
pop 7
@vipyne
vipyne / write-a-targa.c
Last active February 24, 2021 20:02
write a TARGA image file in C
// vanessa writes a targa file
// compiling and running this file will produce a targa file
// a lot of this is based on Grant Emery's file https://www.tjhsst.edu/~dhyatt/superap/code/targa.c thanks dude
// author: vanessa pyne --- github.com/vipyne
#include <stdio.h>
#define BYTE_RANGE 256;
@vipyne
vipyne / webgLOL.html
Created April 7, 2016 01:14
hello triangle...s and circle. a webGL work in progress...
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>webGLOL</title>
</head>
<body>
<script id="vertex-shader" type="x-shader/x-vertex">
// attribute- input value that changes the vertices
@vipyne
vipyne / index.html
Created November 3, 2013 05:49 — forked from dbc-challenges/index.html
DBC Phase 2 Practice Assessment Part 3
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css">
<link rel="stylesheet" href="main.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900">
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css">
</head>