This file contains hidden or 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
* { | |
margin:0; | |
padding:0; | |
} | |
html, body { | |
height:100%; | |
} | |
body { |
This file contains hidden or 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/env python2.7 | |
# -*- coding: utf-8 -*- | |
import couchdbkit | |
import collections | |
database = couchdbkit.Database('http://localhost:5984/marnet') | |
#Kolku se registrirani sekoja godina | |
registrirani_po_godina = collections.Counter() |
This file contains hidden or 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/bash | |
## Send number of arp entries to cosm for graphing. | |
## | |
## It tries to guess the number of people currently present in | |
## the Hacklab (every person has on average one lan connected device) by | |
## counting the arp entries on the lan interface of the router. | |
## | |
## Graph: https://cosm.com/feeds/64676 | |
## cron: |
This file contains hidden or 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 <OneWire.h> | |
#include <LiquidCrystal.h> | |
// For every sensor found it outputs to serial: | |
// SensorID,CurrentTemp,Readout time,Current time | |
// Info at: http://wiki.spodeli.org/Хаклаб/Температура | |
OneWire ds(12); // on pin 12 | |
LiquidCrystal lcd(6, 7, 8, 9, 10, 11); |
This file contains hidden or 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/env python2.7 | |
""" | |
Reads out the temp sensors from serial and posts them to https://cosm.com/feeds/86779 | |
""" | |
import serial | |
import json | |
import requests | |
import time | |
import ConfigParser |
This file contains hidden or 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
int sensorValue; | |
void setup(void) { | |
Serial.begin(9600); | |
} | |
void loop(void) { | |
// If we get a ping from the PC, dump the data | |
if (Serial.available()) { |
This file contains hidden or 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
/* | |
Cosm sensor client | |
This sketch connects an analog sensor to Cosm (http://www.cosm.com) | |
using a Wiznet Ethernet shield. You can use the Arduino Ethernet shield, or | |
the Adafruit Ethernet shield, either one will work, as long as it's got | |
a Wiznet Ethernet module on board. | |
This example has been updated to use version 2.0 of the Cosm.com API. | |
To make it work, create a feed with a datastream, and give it the ID |
This file contains hidden or 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/bash | |
HATTADIR="/home/glisha/webapps/nginx/html/georgi.softver.org.mk.wiki" | |
/home/glisha/bin/uwsgi \ | |
--pidfile $HATTADIR/run/uwsgi.pid \ | |
--daemonize $HATTADIR/run/uwsgi.log \ | |
--processes 1 \ | |
--socket $HATTADIR/run/hatta.sock \ | |
--wsgi-file $HATTADIR/hatta.wsgi \ |
This file contains hidden or 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/bash | |
#*/15 * * * * /root/ds1621/8chasa-grafik.sh > /dev/null 2>&1 | |
rrdtool graph /usr/share/nginx/html/temperatura_4f-8chasa.png \ | |
--vertical-label "°C" \ | |
--title "Температура сензор 4f последните 8 часа" \ | |
--slope-mode \ | |
--end now --start end-8h \ | |
--width 500 --height 200 \ | |
--watermark "`date`" \ |
This file contains hidden or 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 <SPI.h> | |
#include "nRF24L01.h" | |
#include "RF24.h" | |
#include "printf.h" | |
String txtMsg = ""; | |
char cmd[10]; //"state address", state=0|1, address=0..7 | |
char s; | |
byte state; | |
byte address; |
OlderNewer