(Also see [remarkable][], the markdown parser created by the author of this cheatsheet)
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>h5</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.js"></script> | |
<script src="exif.js"></script> | |
<style> | |
#holder { border: 1px dashed #ccc; width: 100px; height: 100px; margin: 20px auto;} | |
#holder.hover { border: 1px dashed #333; } | |
#result .property { width: 100px; } |
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
/****************************************************************************** | |
* MSP430G2553 ACLK Test | |
* | |
* Description: This code can be used to test if you have installed the | |
* 32.768kHz crystal on your LaunchPad correctly. Using this code | |
* LED1 (on P1.0) will turn on for 1 second, and off for one | |
* second. You can verify this with either an oscilloscope, logic | |
* analyzer, or by inspection. Simple as that! | |
* | |
* This code was originally created for "NJC's MSP430 |
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 the truncate filter --> | |
{% for post in site.posts limit:10 %} | |
<h2><a href="{{ post.url }}">{{ post.title }}</a></h2> | |
<span class="post-date">{{ post.date | date: "%B %d, %Y" }}</span> | |
{% if post.content.size > 2000 %} | |
{{ post.content | truncatewords: 300 }} <!-- bad! content gives you rendered html and you will truncate in the middle of a node --> | |
<a href="{{ post.url }}">read more</a> | |
{% else %} | |
{{ post.content }} | |
{% endif %} |
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 "msp430G2452.h" | |
#define FAN_CNT (3) | |
#define PWM_FREQ (32) | |
#define PWM_RESS (128) | |
// Port 1 | |
#define LED1 (1<<0) | |
#define TMP_RX (1<<1) | |
static const int TACH[] = { (1<<3), (1<<4), (1<<5) }; |
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
{% for post in site.posts %} | |
<article class="{% if forloop.first %}first{% elsif forloop.last %}last{% else %}middle{% endif %}"> | |
<div class="article-head"> | |
<h2 class="title"><a href="/{{ post.url }}/" class="js-pjax">{{ post.title }}</a></h2> | |
<p class="date">{{ post.date | date: "%b %d, %Y" }}</p> | |
</div><!--/.article-head--> | |
<div class="article-content"> | |
{{ post.long_description }} | |
<a href="/{{ post.url }}/" class="full-post-link js-pjax">Read more</a> | |
</div><!--/.article-content--> |
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 "msp430.h" | |
/* | |
Simple PWM generator using Timer A | |
Output P1.0, PWM period about 2 ms | |
Duty cycle changes gradually from 5% to 95% | |
Compiled with msp430-gcc | |
aarmot 2013-01-16 |
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
''' | |
Basic tail command implementation | |
Usage: | |
tail.py filename numlines | |
''' | |
import sys | |
import linecache |
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
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
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
%.hex: %.asm | |
avra -fI $< | |
rm *.eep.hex *.obj *.cof | |
all: $(patsubst %.asm,%.hex,$(wildcard *.asm)) | |
upload: ${program}.hex | |
avrdude -c arduino -p m328p -P /dev/arduino-uno -b 115200 -U flash:w:$< | |
monitor: |
OlderNewer