Skip to content

Instantly share code, notes, and snippets.

@phrohdoh
phrohdoh / CLA.md
Last active October 19, 2017 16:11 — forked from CLAassistant/SAP_CLA
Individual Contributor License Agreement

Individual Contributor License Agreement

Thank you for your interest in contributing to open source software projects (“Projects”) made available by Taryn Hill (“Taryn”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Taryn in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact taryn@phrohdoh.com.

You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.

Copyright License. You hereby grant, and agree to grant, to Taryn a non-exclusive, perpetual, irrevocable, worldwide, fully-pa

@phrohdoh
phrohdoh / work_queue.rs
Created August 30, 2017 13:55 — forked from NoraCodes/work_queue.rs
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
//(C) Stephan Vedder 2014
#include "BigFile.hpp"
#include <stdexcept>
BigFile::BigEntry::BigEntry() :
name(""), data(""), size(0), offset(0)
{}
BigFile::BigEntry::BigEntry(std::string name, uint32_t size, std::string data) :
name(name), data(data), size(size), offset(0), new_offset(0)
@phrohdoh
phrohdoh / 1readme.md
Created May 6, 2016 21:08 — forked from akimboyko/1readme.md
ScriptCs as embedded scripting engine for .Net application with NuGet support

ScriptCs as embedded scripting engine for .Net application with NuGet support

This gist contains:

  • ExecuteScriptCs.cs — class that are able to execute ScriptCs from another .Net application
  • ScriptModule.cs — AutoFac configuration for ScriptCs/NuGet dependencies
  • Program.cs — command-line example
  • Sample.csx — sample ScriptCs script
  • packages.config — NuGet packages configuration
@phrohdoh
phrohdoh / git-branch-status
Last active February 14, 2016 05:00 — forked from Mark-Booth/git-branch-status
Version of git-branch-status which only shows the current branch and only generates output if a branch is ahead or behind.Added options to:* Show all branches (revert to the old behaviour)* Show output even if the branch isn't ahead or behind (revert to the old behaviour)* Show branch(es) with respect to origin/master (inspired by git-branches-v…
#!/bin/bash
# hosted at https://gist.github.com/Phrohdoh/de11c5a
# forked from https://gist.github.com/Mark-Booth/505838 @ 595b08 by Phrohdoh
# forked from https://gist.github.com/lth2h/4177524 @ ae184f1 by mark.booth
# forked from https://gist.github.com/jehiah/1288596 @ e357c1e by lth2h
# ideas from https://github.com/kortina/bakpak/blob/master/bin/git-branches-vs-origin-master
# this prints out some branch status
# (similar to the '... ahead' info you get from git status)

How to make a transcript; or, how to get lazy selfish people to help you for free

Often someone (generally me) will tell you to provide a transcript of a terminal session. Here’s how to do that.

Assuming that you’ve got a terminal open, and you’ve been interacting with it, and you want to publish those interactions so that someone else can examine them …

Copy the text