Skip to content

Instantly share code, notes, and snippets.

View mattbis's full-sized avatar

Matthew mattbis

View GitHub Profile
@sroucheray
sroucheray / README.md
Last active December 11, 2015 15:08
A requestAnimationFrame like API which makes its best to maintain a specific framerate
@neg3ntropy
neg3ntropy / project_env.sh
Last active August 8, 2016 14:44
Bash script to manage per-project shell environment and other settings. Include in the project root, customize and source with the shell to activate. The rest of the boilerplate adds support for: * finding the absolute path of project root, independently of the current shell's working directory * a nice indicator with the project name to the pro…
###############################################################################
# Development environment helper to set up project paths and other variables #
###############################################################################
#
# Copyright (C) 2012 Andrea Ratto <andrearatto at yahoo dot it>.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
@AdrianWhelan
AdrianWhelan / meta-tags.md
Created October 26, 2012 12:07 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@amatiasq
amatiasq / curry.js
Last active March 15, 2019 10:34
Simple way to recursively curry javascript functions http://jsfiddle.net/amatiasq/osrsomq0/
/**
* @param {Function} fn Function to curry.
* @param {Number} lenght The arguments required to invoke the function. Optional. By default is fn.length
* @returns {Function} The currified function.
*/
function curry(fn, length) {
length = length || fn.length;
return function currified() {
var args = [].slice.call(arguments);
@asurada404
asurada404 / tmux-cheatsheet.markdown
Created May 8, 2020 16:28 — forked from ryerh/tmux-cheatsheet.markdown
Tmux 快捷键 & 速查表 & 简明教程

注意:本文内容适用于 Tmux 2.3 及以上的版本,但是绝大部分的特性低版本也都适用,鼠标支持、VI 模式、插件管理在低版本可能会与本文不兼容。

Tmux 快捷键 & 速查表 & 简明教程

启动新会话:

tmux [new -s 会话名 -n 窗口名]

恢复会话:

@lanejames35
lanejames35 / timesheet.pl
Created May 8, 2020 18:54
Timesheet generator
###############
# Generate a time sheet entry
###############
#!/usr/bin/perl
# Formats for month names
@months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec );
@weekdays = qw( Mon Tue Wed Thurs Fri Sat Sun );
# get todays date
/********************
* theLongWayOut.js *
********************
*
* Well, it looks like they're on to us. The path isn't as
* clear as I thought it'd be. But no matter - four clever
* characters should be enough to erase all their tricks.
*/
function startLevel(map) {
"""This is an attempt at naively using a neural ODE for trajectory optimization
over a finite time horizon. This script shows that it fails miserably due to
issues recovering the initial conditions in reverse pass."""
from operator import itemgetter
import time
import control
import matplotlib.pyplot as plt
import jax
from jax import random
@akolybelnikov
akolybelnikov / TimSort.js
Created May 8, 2020 22:11
Implementation of the Timsort algorithm in JavaScript
/*
* timsort Javascript
*
* Licensed under GPL 3 ( http://www.gnu.org/licenses/gpl.html ) license.
*
*/
Array.prototype.timsort = function(comp){
var global_a=this
var MIN_MERGE = 32;
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions