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
import sys | |
#read Brainfuck from file and filter | |
filename = sys.argv[1] | |
with open(filename) as f: | |
bf = f.read() | |
legal = set('><+-.,[]') | |
bf = ''.join(c for c in bf if c in legal) |
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
#!/bin/bash | |
git --work-tree=/var/notesworking --git-dir=/var/notes checkout -f | |
changed=$(git diff-tree -r HEAD | sed 's/^.*\s[A-Z]\s\s*//g' | sed 1d) | |
for filename in $changed | |
do | |
echo $filename | |
filetype=$(echo $filename | sed 's/.*\.//g') | |
if [ $filetype == "md" ] | |
then |
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
No-one else should be using this, but if you are, no personal information will ever be retained or used. |
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
# Stubs for secrets (Python 3.6) | |
# | |
# NOTE: This dynamically typed stub was automatically generated by stubgen. | |
from typing import Any, Optional | |
from hmac import compare_digest as compare_digest | |
from random import SystemRandom as SystemRandom | |
randbits = ... # type: Any | |
choice = ... # type: Any |
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
Last updated: 12th January, 2017 | |
This document outlines the privacy policy for the Momentum app. Momentum is bound by the Australian Privacy Act 1988 (Cth). | |
Collection of personal information | |
================================== | |
Momentum collects personal information local to your device for the purposes of fulfilling its purpose. It does not store personally identifying information except for user-inputted content. | |
Sharing of personal information |
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
var mouseDeadZone = 50; | |
if (this.game.getMouseX() > this.getXPosition() + mouseDeadZone) | |
{ | |
this.setXSpeed(100); | |
this.setYSpeed(0); | |
this.playAnimation('Right'); | |
} | |
else if (this.game.getMouseX() < this.getXPosition() - mouseDeadZone) | |
{ | |
this.setXSpeed(-100); |
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 <stdio.h> | |
#include <stdlib.h> | |
struct node { | |
int data; | |
struct node *next; | |
}; | |
struct node *new_node(int data, struct node *next); | |
void print_list(struct node *head); |
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 <stdio.h> | |
#include <stdlib.h> | |
#include "List.h" | |
List makeList(void) { | |
List l = calloc(1, sizeof(list)); | |
return l; | |
} | |
List addAtHead(List l, int value) { |
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
#! /bin/bash | |
make | |
./vmsim lru 5 4 < trace1 > my-out-lru-5-4-trace1.txt | |
diff my-out-lru-5-4-trace1.txt out-lru-5-4-trace1.txt | |
./vmsim fifo 5 4 < trace1 > my-out-fifo-5-4-trace1.txt | |
diff my-out-fifo-5-4-trace1.txt out-fifo-5-4-trace1.txt | |
./vmsim lru 8 4 < trace2 > my-out-lru-8-4-trace2.txt |
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
import Web3 from "web3"; | |
import { getWeb3 } from "./utils/web3"; | |
const Contract = require("truffle-contract"); | |
import * as SaleABI from "../../build/contracts/YabbySale.json"; | |
import * as CoinABI from "../../build/contracts/YabbyCoin.json"; | |
function showWeb3(divName: string, web3: Web3) { | |
const elt = document.getElementById(divName); |
OlderNewer