This file contains hidden or 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
/* | |
Simple program that treats a C/C++ source | |
file *as* the build script. This is the | |
step between: compiling a source file | |
directly, and creating a build script. | |
License: MIT | |
@build.cc clang | |
@build.out build |
This file contains hidden or 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> | |
typedef struct { | |
int counter; | |
} StateMachine; | |
typedef void* (State)(StateMachine*); | |
State* | |
second_State(StateMachine* state_machine) |
This file contains hidden or 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
(setq cmd-char ?!) ;; the leader for our commands '!' | |
(defun show-commands () | |
(print "ran !commands")) | |
;; take a string input (what the twitch user types) | |
;; and look for a '!' + one of our commands. | |
(defun run-command (input) | |
;; get the 0th character from our string and compare it to '!' | |
(if (eq cmd-char (aref input 0)) |
This file contains hidden or 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
<!-- This theme is loosely based off of Jonathan Blow's emacs theme --> | |
<?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"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> |
This file contains hidden or 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 std | |
// should cover the main "problematic" characters | |
def char_to_entity(char): | |
return switch(char): | |
case "|" : "|" | |
case "_" : "_" | |
case ";" : ";" | |
case "#" : "#" | |
case "-" : "‐" |
This file contains hidden or 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
int fib(n) | | |
if n <= 1 ? return x : return fib(n-1) + fib(n-2) | |
string concat(x, y) | return (string) x + y | |
vector loopTest(n) | | |
i = 0, ret_vec = [] | | |
for i != n : ret_vec[i] = i * 2, i++ >> return ret_vec | |
vector tokenStream = [] |
This file contains hidden or 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
wget https://dl.google.com/go/go1.12.darwin-amd64.tar.gz | |
tar -C /usr/local -xvf go1.12.darwin-amd64.tar.gz | |
export PATH=$PATH:/usr/local/go/bin | |
go get -u github.com/mum4k/termdash | |
cd $HOME/go/pkg/mod/github.com/mum4k/termdash/[email protected]/termdashdemo |
This file contains hidden or 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 numTweets = parseInt(document.querySelector("[data-count]").innerHTML.replace(/\s+/, "")); | |
function deleteTweet() { | |
document.getElementsByClassName("ProfileTweet-actionButton")[0].click(); | |
document.getElementsByClassName("js-actionDelete")[0].click(); | |
document.getElementsByClassName("delete-action")[0].click(); | |
} | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); |
This file contains hidden or 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
function fizz_buzz(num) | |
{ | |
if (num % 15 == 0) { | |
console.log("FizzBuzz"); | |
} else if (num % 5 == 0) { | |
console.log("Buzz"); | |
} else if (num % 3 == 0) { | |
console.log("Fizz"); | |
} else { | |
console.log(num); |