Skip to content

Instantly share code, notes, and snippets.

// Arduino pin config
#define PIN_M1 5
#define PIN_M2 4
#define PIN_M3 3
#define PIN_M4 2
#define PIN_LDR A4
#define PIN_HES A7
// LDR config
startup_message off
vbell on
# caption string '%?%F%{.R.}%?%3n %t%? [%h]%?'
caption always
caption string '%{= mC} %d/%m %c %S %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<'
@rafacouto
rafacouto / ATSHA204.cpp
Created December 4, 2015 10:09 — forked from ghedo/ATSHA204.cpp
Arduino library for the ATSHA204 authentication chip
/*
* Arduino library for the ATSHA204 authentication chip.
*
* The ATSHA204 is a tiny and low-power authentication chip. This library
* implements a simple interface to access most of the chip functionality from
* an Arduino.
*
* Note that only the Single-Wire Interface (SWI) is currently supported.
*
* FEATURES:
#!/bin/bash
# https://github.com/prasmussen/gdrive
GDRIVE=/tmp/drive-linux-x64
# list of folders (review 'list' command)
LIST='18iT7rybp2MHlPvM3x0wYZTqA0A,2015:1Ua9MSA1CMGwEyoOxRyWd2xDREQ,2014:1NNP--HtjAsOg73cAVbV7pxT9Ng,2013:1t-fCxQMnJ6J9jghkgoay8itpFQ,2012:10I754WYiM6QbcAOtI3GB9ufRiA,2011:1DU_RkrXW09zqRB3eMx9dNAAWjg,2010:1OkOng3PvDhwAJOPYsPrQD1mpcA,2009:1nK7DH8hf4UaJ4ueasFHfEO-lqA,2008:1IIjYF5mtu42rNyuuV2mfl7aVew,2007'
IFS=':' read -ra DIRS <<< "$LIST"
for D in "${DIRS[@]}"; do
#define BAUDS 115200
void setup() {
Serial.begin(BAUDS);
Serial1.begin(BAUDS);
}
void loop() {
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include "boards.h"
#include "macros.h"
//===========================================================================
//============================= Getting Started =============================
//===========================================================================
/*
@rafacouto
rafacouto / MySQL master-slave config in Symfony
Last active August 29, 2015 14:21
Symfony and doctrine configuration with slave servers
# Doctrine Configuration
doctrine:
dbal:
driver: "%database_driver%"
host: "%database_host%"
port: "%database_port%"
dbname: "%database_name%"
user: "%database_user%"
password: "%database_password%"
charset: UTF8
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
class test
{
public static void Main(String[] args)
{
string hostName = "india.colorado.edu";
int hostPort = 13;
<?php
$a = 5;
$b = 5;
for ($aa = 0; $aa <= $a; $aa++)
{
for ($bb = 0; $bb <= $b; $bb++)
{
if ($aa == 0 || $bb == 0)
<?php
$a = 2;
$b = 2;
$c = 1;
$d = 1;
$e = 3;
$f = 3;