Skip to content

Instantly share code, notes, and snippets.

@nmsl1993
nmsl1993 / index.html
Created June 4, 2017 07:26
Gate Commander
<meta name="viewport" content="width=device-width, initial-scale=1">
<head>
<title>The Garbage Zone</title>
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<style>
path {
stroke: steelblue;
@nmsl1993
nmsl1993 / Main.sublime-menu
Created November 20, 2016 18:51
SublimeREPL - Matlab
[
{
"id": "tools",
"children":
[{
"caption": "SublimeREPL",
"mnemonic": "R",
"id": "SublimeREPL",
"children":
[
NOTE: Commands starting with $ are executed at the linux command line (bash).
Commands starting with > are executed within the gatttool cmd-line utility.
Parentheticals are comments and should not actually be typed.
$ sudo hcitool lescan
$ sudo gatttoool -b C4:C3:00:01:07:C9 -I
> connect
> primary (this lists available services)
@nmsl1993
nmsl1993 / Makefile
Created October 20, 2016 04:06
SublimeGDB Makefile Template
# Makefile for STM32F7-Discovery-Blinky
PROJECT = sublime_gdb_test
################
# Sources
SOURCES_C = main.c
@nmsl1993
nmsl1993 / _.md
Last active September 17, 2016 03:37
D3LinePlot
@nmsl1993
nmsl1993 / readAlist.m
Created February 16, 2016 05:12
A utility which read reads alist files as defined on http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html by Prof. David Mackay
function [H] = readAlist(filename)
%readAlist.m by Noah Levy
%A utility which read reads alist files as defined on
%http://www.inference.phy.cam.ac.uk/mackay/codes/alist.html by Prof. David Mackay
fid=fopen(filename);
tline = fgetl(fid);
%N is number of rows, M is number of cols
%%%%%%%%%%%%%READ SIZE OF ALIST MATRIX%%%%%%%%%%%%%
split_line = regexp(tline, '\d+','match');
@nmsl1993
nmsl1993 / who_cornell.py
Last active September 6, 2015 01:51
A short python script to see who is REALLY on amdpool
#! /usr/bin/env python
import sys,pexpect,subprocess,urllib2,re,multiprocessing,argparse,types
amdpool_servers =['amdpool-01','amdpool-02','amdpool-03','amdpool-04']
def getNameFromDirectoryPage(netID):
req = urllib2.Request('https://www.cornell.edu/search/people.cfm?netid=' + netID + '&tab=people')
response = urllib2.urlopen(req)
the_page = response.read()
name = re.search('<h3 class=\"cu-headline\" style=\"display: inline; margin-right: 1em;\">(.*)</h3>',the_page)
if not name:
Here's the process I used to get JCWren's LPC2148 FreeRtos code(http://jcwren.com/arm/packages/LPC2148_Demo_latest.tgz) to compile.
$ make
After that I got some error about "missing expression -- 'swi'"
I then did
$ grep -i -r "asm.*swi" .