Skip to content

Instantly share code, notes, and snippets.

View halldorel's full-sized avatar

Halldór Eldjárn halldorel

View GitHub Profile
@halldorel
halldorel / serial.ino
Created March 6, 2016 19:07
Arduino passthrough serial
#include <SoftwareSerial.h>
#define RX_PIN 9
#define TX_PIN 10
SoftwareSerial printer = SoftwareSerial(RX_PIN, TX_PIN);
void setup() {
Serial.begin(9600);
printer.begin(19200);
@halldorel
halldorel / epson-printer.ino
Created February 25, 2016 01:02
EPSON printer arduino test shit
#include <SoftwareSerial.h>
#define RX_PIN 9
#define TX_PIN 10
SoftwareSerial printer = SoftwareSerial(RX_PIN, TX_PIN);
char a = 0x00;
void setup() {
// Example program
#include <iostream>
#include <string>
using namespace std;
int main()
{
double scores = 0;
double totals = 0;
{
"amps": 100.0,
"description": "Test Description 1",
"name": "Test Station 1",
"plugs": [
{
"code": "CHAdeMO",
"description": "Quick Charge",
"id": 1
},
@halldorel
halldorel / display.ino
Created July 26, 2015 17:25
Arduino 7-segment display shift register countdown with button
#define BTN 7
#define IN 9
#define CP 10
#define RS 11
#define MAX_SECS 10000
// q7, q6, q5, q4, q3, q2, q1, q0
// Layout bitmasks for the screen. This is highly dependent on the pinout of the 7-segment display
@halldorel
halldorel / gist:bb10d26212cc9e8b1d5c
Created May 23, 2015 16:28
Hvernig velja á herbergi
function shuffle(o){ for(var j, x, i = o.length; i; j = Math.floor(Math.random() * i), x = o[--i], o[i] = o[j], o[j] = x); return o; }
var couples = ["SM", "KÁ", "HH"];
var rooms = ["MB", "Hjónó", "Bónó"];
couples = shuffle(couples);
rooms = shuffle(rooms);
for (var i in couples) {
console.log(couples[i] + " gista í " + rooms[i] + " og hafa massa gaman");
/* Settings */
$break-small-width: 800px
$num_cols: 12
$col_padding: 2%
$main-color: /* Insert color here */
=desktop()
@media screen and (min-width: $break_small_width+1)
@content
=mobile()
["hestur", "stóll", "bíll", "langijón", "humar", "sundlaug", "kaffi", "bolli", "epli", "haus", "grænmeti", "sykur", "snákur", "kerfi", "ljós", "vagn", "op", "inn", "maður", "fyndið", "leiðinlegt", "drasl", "ljótt", "verkfæri", "sög", "hamar", "plata", "sími", "pizza", "pepperóní", "ostur", "ostrur", "beikon", "hringing", "takkaborð", "flugnanet", "bjór", "bensín", "jakkaföt", "gjaldþrot", "fyrirtæki", "vísitala", "klukka", "reiknirit", "vanskilaskrá", "mergsuga", "bein", "hangikjöt", "baunir", "ísland"];
%{
/* C/C++ skilgreiningar */
#include <math.h>
#include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <string>
#include <map>
high fructose corn syrup (heimild toxnet)
_já_
Gott á bragðið.
_nei_
Mjög líklega meginorsök offitu á Vesturlöndum, getur einnig valdið hjarta- og æðasjúkdómum og fitu-lifur.
phosphoric acid
_já_
Gott í að losa ryð og notað til dæmis í tannlækningum við að hreinsa tennur.
_nei_