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
;Interrupt 0 Example | |
; Flashes LED0 at a fixed rate, interrupting whenever button is pressed | |
; | |
.device atmega 168 | |
.def temp = r16 | |
.def temp2 = r17 | |
.org 0 | |
; | |
;Interrupt Vector Table | |
jmp reset |
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 <stdio.h> | |
#include <stdlib.h> | |
#define STREAM (256 * 8) | |
/* short program to understand linear feed shift register | |
* and its use in stream ciphers. | |
*/ | |
int |
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
;example program using debouncing | |
;from AVR Programming by Elliot Williams p.115 | |
; | |
;compile with gavrasm debouncer.asm | |
;flash with avrdude -c avrisp -p m168 -P /dev/tty.usbmodem1411 -b 19200 -U flash:w:debouncer.hex | |
; | |
.def temp = r16 | |
.device atmega168 | |
;--- inits --- | |
.def b_pressed = r17 |
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
@ lets try to blink an LED on the discovery stm32 L1 board | |
@ uses LED on PB7 | |
@ how to compile and flash: | |
@ arm-none-eabi-as -mcpu=cortex-m3 blinky.s -o blinky.o | |
@ arm-none-eabi-ld -v -T stm32.ld -nostartfiles -o blinky.elf blinky.o | |
@ arm-none-eabi-objcopy -O binary blinky.elf blinky.bin | |
@ then from st-link (https://github.com/texane/stlink) | |
@ ./st-flash write ../first_arm/blinky.bin 0x08000000 | |
.thumb |
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 ( | |
"fmt" | |
"log" | |
"os/exec" | |
"bufio" | |
"strings" | |
"net/http" | |
"time" |
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 ( | |
"fmt" | |
"log" | |
"os/exec" | |
"bufio" | |
"strings" | |
"strconv" |
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 <stdio.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <net/bpf.h> | |
#include <net/if.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> |
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 <stdio.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <net/bpf.h> | |
#include <net/if.h> | |
#include <sys/ioctl.h> | |
#include <sys/socket.h> |
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/perl -w | |
# Author: Mark Foster | |
# (c) 2009 Credentia http://www.credentia.cc/ | |
# $Id: check_zone.pl 104 2009-04-13 10:04:51Z mdf $ | |
# Based on zonechk.pl, this script is a nagios plugin | |
# | |
# BUGS | |
# Not known | |
# | |
# TO DO |
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
/* quick and dirty code to play around pushing | |
* aws metrics to cloudwatch | |
*/ | |
package main | |
import ( | |
"bufio" | |
"time" | |
"fmt" |
NewerOlder