This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Copyright (C) 2012 Matthías Páll Gissurarson | |
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#encoding utf-8 | |
import sys, os | |
from itertools import takewhile | |
def getFuncs(filename, funcDef = "def "): | |
lines = open(filename,'r').readlines() | |
funcDefIn = lambda line: True if line.strip().startswith(funcDef) else False | |
funcs = map(lambda i: [lines[i]] + list(takewhile(lambda x: not funcDefIn(x),lines[i+1:])),filter(lambda i: funcDefIn(lines[i]),range(len(lines)))) | |
# grabs lines until start of next func/end of file lines where functions start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell, ScopedTypeVariables, TypeInType, TypeOperators, | |
TypeFamilies, GADTs, UndecidableInstances, InstanceSigs #-} | |
{-# OPTIONS_GHC -Wincomplete-patterns #-} | |
import Data.Kind | |
import Data.Singletons.TH | |
import Data.Singletons.Prelude | |
import Prelude hiding ( take ) | |
$(singletons [d| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gist: https://gist.github.com/plexsoup/64852540504101b520b25f7c3fa84e5f | |
// By: Plexsoup - copied from Mark by The Aaron. With help from Scott C, Stephen L and Tritlo | |
// Thanks: Testers and Feedback: al e., DM Robzer, Vince, Pat S, Gold, Anthony, Kryx, Sudain | |
// Contact: https://app.roll20.net/users/258125/plexsoup | |
// Roll20 API Script to leave a breadcrumb trail of torches. Based on "Mark" from The Aaron // | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "DCPU.h" | |
using namespace std; | |
DCPU::DCPU(void) { | |
// Allocate memory space | |
mem = new uint16_t[0x10000]; | |
cout << "Allocated 128k memory" << endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PlyReader.js (C) 2014 Matthias Pall Gissurarson. | |
//Partially based on https://github.com/gnomeby/canvas3D, which has no License. | |
/* | |
The MIT License (MIT) | |
Copyright (c) 2014 Matthias Pall Gissurarson | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2019-01-02 | |
# | |
# _______________| noise : ambient Brown noise generator (cf. white noise). | |
# | |
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave] | |
# ^minutes can be any positive integer. | |
# Command "noise 1" will display peak-level meter. | |
# | |
# Dependencies: play (from sox package) |