Skip to content

Instantly share code, notes, and snippets.

View SyntaxColoring's full-sized avatar
🥟

Max Marrone SyntaxColoring

🥟
View GitHub Profile

Whoa:

$e^{\pi i} = -1$

Wowzers:

$$ \begin{matrix} 1 & x & x^2 \ 1 & y & y^2 \

class Foo:
bar: int
reveal_type(Foo().bar) # OK, builtins.int
reveal_type(Foo.bar) # mypy says builtins.int,
# but I expected this to be an error.
print(Foo.bar) # Passes type-checking and raises AttributeError at runtime.
@SyntaxColoring
SyntaxColoring / Protocols.postman_collection.json
Last active October 27, 2021 20:49 — forked from mcous/README.md
Postman robot-server testing
{
"info": {
"_postman_id": "54b6a1a2-20c7-4fda-b496-8763b3135158",
"name": "Protocols",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "GET /protocols",
"request": {
@SyntaxColoring
SyntaxColoring / A.cpp
Created July 3, 2018 05:40
Dangerous Linkage
#include <iostream>
struct S
{
int i;
int f(int j) // Multiply.
{
return i*j;
}
};

Keybase proof

I hereby claim:

  • I am SyntaxColoring on github.
  • I am maxpm (https://keybase.io/maxpm) on keybase.
  • I have a public key whose fingerprint is 1C5B 4456 16A7 96CF 96E7 43D5 229D 4C1C FA0E F210

To claim this, I am signing this object:

@SyntaxColoring
SyntaxColoring / Sine.js
Last active January 1, 2016 10:19
Trace a sine wave with your flag on isitchristmas.com.
var theta = 0.0;
window.setInterval(function() {
theta += Math.PI/10;
if (theta >= Math.PI*4) theta = 0.0;
var event = {clientX: theta*100, clientY: (Math.sin(theta)+1.5)*100, button: 2};
me.angle = Math.cos(theta)*180/Math.PI;
setRotate(me.flag, me.angle);
emit('scroll', {id: me.id, angle: me.angle});
document.onmousemove(event);
document.onmousedown(event);
@SyntaxColoring
SyntaxColoring / Cacheify.js
Last active December 25, 2015 21:19
A bookmarklet to view an iBoss-blocked page through Google's cache.
// This is the non-minified code.
// See below for the bookmarklet.
(function() {
var PREFIX = 'http://webcache.googleusercontent.com/search?q=cache:';
// Handle LMSD iBoss pages specially.
if (window.location.hostname == 'blocked.lmsd.org') {
var pairs = window.location.search.substring(1).split('&');
pairs.forEach(function(pair) { // Look for the blocked URL in the query string.
@SyntaxColoring
SyntaxColoring / .profile
Last active December 16, 2015 15:59
Terminal personalization.
# Enable ls colors by default.
alias ls="ls -G"
# For convenience. Changes the current directory and immediately displays its contents.
cdls() { cd "$@" && ls; }
# Use Shared as the default working directory.
cd /Users/Shared
# For the hell of it. Print a randomly-colored Aperture Science logo on login.
@SyntaxColoring
SyntaxColoring / JavaC.sublime-build
Created March 7, 2013 19:24
Sublime Text's Java build system modified to run the program after it's compiled.
{
"shell": true,
"cmd": ["javac $file && java $file_base_name"],
"file_regex": "^(...*?):([0-9]*):?([0-9]*)",
"selector": "source.java"
}