Skip to content

Instantly share code, notes, and snippets.

View mashiox's full-sized avatar
🕵️‍♂️
Building better questions

Matthew Walther mashiox

🕵️‍♂️
Building better questions
View GitHub Profile
@mashiox
mashiox / string_tokenize.cpp
Created February 15, 2016 05:25
Tokenize a SIC/XE asm file string
#include <iostream>
#include <string>
#include <cstdlib>
#include <vector>
using namespace std;
struct line{
private:
string label,
@mashiox
mashiox / smbc.js
Created February 27, 2016 21:19
SMBC Object
SMBC = {
Track: function(name, pass, email, access){
this._name = name;
this._password = Package.sha.SHA256(pass)
this._email = email;
this._access = access;
},
}
SMBC.Track.prototype.getName = function(){
@mashiox
mashiox / main.js
Created March 29, 2016 02:52
Pagination Helper
paginationClickHelper = function (event) {
event.preventDefault();
try {
if ($("li#" + event.currentTarget.id).hasClass("pagination").toString()) {
$("div#displayTable").hide();
$("div.table" + event.currentTarget.id).show();
// update pagination
var $listItems = $('li');
@mashiox
mashiox / if.php
Last active February 27, 2017 01:38 — forked from anonymous/if.php
PHP goto if then else
<?php
/* If - then */
function if( $conditional = false, $then = function(){} )
{
case ( $conditional )
{
case true:
goto isTrue;

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@mashiox
mashiox / indentation.php
Created October 12, 2017 22:58
Demonstrate tabulation practices in HTML-embedded PHP
<!-- CASE 1 -->
<div>
<?php if ($someCond): ?>
<!-- Standard indentation in body of IF -->
<p>
<a href="/">Go Home</a>
</p>
<?php endif; ?>
</div>

Keybase proof

I hereby claim:

  • I am mashiox on github.
  • I am cosinetau (https://keybase.io/cosinetau) on keybase.
  • I have a public key whose fingerprint is A8CC A8D7 8319 62BE 1E49 0DED 465D AC3A A132 54DA

To claim this, I am signing this object:

<?php
/**
* Example usage:
*
* // Initalize the client
* $imap = DIOIMAP::init();
*
* // Initalize the email client without a postfix and search for the latest unread email
* $emailMessage = DIOIMAP::init()->findEmail();
*
@mashiox
mashiox / master_list.md
Created May 11, 2018 18:37
Contracting Master List
@mashiox
mashiox / safe_base.md
Created May 14, 2018 21:05
Safe ways to do things in bash