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
# | |
# Makefile for msp430 assembler | |
# Build single GNU asm source | |
# | |
# 'make' builds everything | |
# 'make dump' generates assembler dump of target | |
# 'make burn' flashes target into launchpad | |
# 'make clean' deletes everything except source files and Makefile | |
# | |
# You need to set TARGET and MCU for your project |
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
#include "msp430.h" | |
/* | |
BLDC motor driver ver1 | |
P2.0 P2.1 P2.2 go through cycle | |
010 | |
011 | |
001 | |
101 |
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
# | |
# Makefile for msp430 | |
# | |
# 'make' builds everything | |
# 'make lst' generates assembly listings of each source | |
# 'make dump' generates assembler dump of target | |
# 'make burn' flashes target into launchpad | |
# 'make clean' deletes everything except source files and Makefile | |
# | |
# You need to set TARGET, MCU and SOURCES for your project. |
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
# Show .s and .S asm sources in file open dialog | |
source.files=*.asm;*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hxx;*.hpp;\ | |
*.rc;*.rc2;*.def;*.java;*.js;*.py;*.pl;*.rb;*.cgi;*.lua;*.conf;\ | |
Make*;make*;*.mak;*.properties;*.html;*.xml;*.iface;*.bat;\ | |
*.s;*.S;*.dump;*.haml | |
# GNU asm file | |
file.patterns.gasm=*.s;*.S;*.dump | |
filter.gasm=GNU Assembler (asm)|$(file.patterns.gasm)| | |
lexer.$(file.patterns.gasm)=asm |
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
#!/bin/sh | |
# Configure OpenWrt NAS | |
# Attached USB drive is accessible through | |
# 1. http://nasbox/A | |
# 2. CIFS - //nasbox/A | |
# 3. DLNA | |
# where "nasbox" is your router name and "A" represents one of the mountpoints below |
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
#!/bin/sh | |
# Hotlug2 script which starts minidlna when USB disk gets attached | |
# [email protected] | |
# Sharing: GPLv3 or later | |
# To handle minidlna startup through hotplug you should disable minidlna autostart | |
# /etc/init.d/minidlna disable | |
# and copy current script to /etc/hotplug.d/block/30-minidlna |
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
#!/bin/sh /etc/rc.common | |
# Copy this skript to /etc/init.d/adblock and enable: | |
# chmod +x /etc/init.d/adblock | |
# /etc/init.d/adblock enable | |
START=90 | |
ADS='http://pgl.yoyo.org/as/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext' |
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
-- HTTP redirect daemon | |
local port = 80 | |
local redir = "HTTP/1.0 301 Moved Permanently\nLocation: https://example.org/\n\n" | |
local socket = require("socket") | |
local daemon = require("daemon") | |
daemon.daemonize() | |
local server = assert(socket.bind("*", port)) |
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
# To reduce eMMC wear remap write-intensive directories to memory fs | |
# Mount /tmp into tmpfs | |
sudo echo "tmpfs /tmp tmpfs defaults 0 0" >> /etc/fstab | |
sudo rm -rf /var/tmp && ln -s /tmp /var/tmp | |
# Mount /var/log into tmpfs | |
sudo cat > /etc/init/mount-log.conf <<EOT |
OlderNewer