Skip to content

Instantly share code, notes, and snippets.

View prostosergik's full-sized avatar

Serge Liskovsky prostosergik

View GitHub Profile
@prostosergik
prostosergik / Makefile
Last active May 4, 2019 20:47
TNE scooters controller via UART implementation
MCU=attiny13
FUSE_L=0x6A
FUSE_H=0xFF
F_CPU=1200000
CC=avr-gcc
LD=avr-ld
OBJCOPY=avr-objcopy
SIZE=avr-size
AVRDUDE=avrdude
CFLAGS=-std=c99 -Wall -g -Os -mmcu=${MCU} -DF_CPU=${F_CPU} -I. -I.. -DUART_RX_ENABLED -DUART_TX_ENABLED -DUART_BAUDRATE=19200
@prostosergik
prostosergik / main.c
Last active August 29, 2015 14:07 — forked from cosard/main.c
#include "uart.h"
#include "rtc.c"
// Baud rate setting
#define BAUD 9600
void main(void) {
// Serial channel (9600, N,8,1)
uart_init((UART_BAUD_SELECT((BAUD),F_OSC)));
sei(); // interrupt enable
@prostosergik
prostosergik / mvd.sh
Created January 22, 2014 20:42
Script for quick virtual domain creation.
#!/bin/bash
HOST="Unknown";
if [ "$1" != "" ]; then
HOST="$1";
else
echo "Enter hosthame: ";
read HOST;
fi
@prostosergik
prostosergik / openwrt_downloader.php
Last active December 27, 2015 15:39
Tool to download latest OpenWRT firmware for TPLink WR703N. Can be used to crezte local repository.
<?php
$url = 'http://downloads.openwrt.org/snapshots/trunk/ar71xx/';
$local_dir = dirname(__FILE__).'/'.date('Y-m-d').'/';
$local_dir_packages = $local_dir.'packages/';
if(!is_dir($local_dir) || !is_dir($local_dir_packages)) {
mkdir($local_dir);
mkdir($local_dir_packages);