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 <iostream> | |
using namespace std; | |
class LCG { | |
unsigned long s; | |
static const unsigned long M = 1103515245UL; | |
static const unsigned long A = 12345UL; | |
static const unsigned long B = 2147483647UL; | |
public: |
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
using System; | |
using System.Collections; | |
using UnityEngine; | |
public class Testing : MonoBehaviour | |
{ | |
void Start() | |
{ | |
// In C#, this is an 'Anonymous Type' | |
// A new System.Type is generated for it at compile type |
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
*.meta -diff | |
*.asset -diff | |
*.unity -diff |
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
7th-order spline and first three derivatives | |
f(t) = a_7 t^7+a_6 t^6+a_5 t^5+a_4 t^4+a_3 t^3+a_2 t^2+a_1 t+a_0 | |
f'(t) = 7 a_7 t^6+6 a_6 t^5+5 a_5 t^4+4 a_4 t^3+3 a_3 t^2+2 a_2 t+a_1 | |
f''(t) = 42 a_7 t^5+30 a_6 t^4+20 a_5 t^3+12 a_4 t^2+6 a_3 t+2 a_2 | |
f'''(t) = 210 a_7 t^4+120 a_6 t^3+60 a_5 t^2+24 a_4 t+6 a_3 | |
Constraints | |
f(0) = 0 = a_0 | |
f(1) = 1 = a_7 + a_6 + a_5 + a_4 + a_3 + a_2 + a_1 + a_0 | |
f'(0) = 0 = a_1 |
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
#!/usr/bin/env python | |
# easyIMAP2Notes (C)2015 by Jan-Piet Mens | |
# Connect to an IMAP mailbox, read messages, and convert them into | |
# a format suitable for iOS/OSX Notes, then store them in Notes/ | |
# | |
# This uses two connections (consider that a feature b/c you can | |
# slurp from one IMAP account into another). The real reason is I | |
# couldn't be bothered to implement message decoding/attachment | |
# extraction with imaplib, so I chose easyimap (pip install easyimap) | |
# to do that. |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# addnote.py by JP Mens (September 2015), inspired by Martin Schmitt | |
# Usage: addnote subject "body (may be empty") [image ...] | |
# Adds a Notes.app (OSX and iOS) compatible message to the "Notes" | |
# IMAP folder. The IMAP store is configured from a file called | |
# `creds': | |
# | |
# [imap] | |
# hostname = |
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
.client | |
.server | |
Dockerfile |
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
/* | |
Original idea from | |
http://www.acloudtree.com/how-to-shove-data-into-postgres-using-goroutinesgophers-and-golang/ | |
*/ | |
package main | |
import ( | |
"log" | |
"time" | |
"os" |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
"strings" | |
) |
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
doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $* | |
doskey ls=ls $1 --color | |
doskey ll=ls -la --color | |
doskey sbl = sublime $* | |
doskey sshs = ssh tom@188.230.237.133 | |
doskey oocd = openocd-x64-0.6.1 -f .\stm32f4discovery.cfg | |
doskey oocd7 = openocd-x64-0.7.0 -f .\stm32f4discovery.cfg | |
doskey sshkey = type C:\Users\dcrystalj\.ssh\id_rsa.pub | clip & echo "ssh key in clipboard" | |
:: Git |
OlderNewer