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
require('crypto').createHash('sha1').update("123").digest('hex') | |
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
### Raspberry Pi setup | |
(29.04.2014) | |
http://downloads.raspberrypi.org/raspbian_latest | |
# 2014-01-07-wheezy-raspbian.zip | |
dd if=2014-01-07-wheezy-raspbian.img od=/dev/mmcblk0 |
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
# -*- coding: utf-8 -*- | |
""" | |
mpws: main | |
@author: maxp | |
""" | |
from datetime import datetime, timedelta | |
import conf |
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
// | |
// arduino pro micro | |
// | |
#define POWER_GREEN 240 | |
#define POWER_YELLOW 40 | |
#define POWER_BLINK 20 | |
#define POWER_OFF 3 |
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
<div id="openirk_socmap"></div> | |
<script type="text/javascript"> | |
window.OPENIRK_USER_ID = "unique_id"; | |
window.OPENIRK_USER_FAMILY = "Иванов"; | |
window.OPENIRK_USER_NAME = "Иван"; | |
window.OPENIRK_USER_PATR = "Петрович"; | |
window.OPENIRK_USER_EMAIL = "ivan@ivanov.ru"; | |
/* |
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
// - http://habrahabr.ru/post/236251/ | |
// set edge event on specific gpio_line | |
int gpio_edge_set(int n, const char *edge_str) | |
{ | |
char filename[PATH_MAX]; | |
FILE *file; | |
snprintf(filename, sizeof(filename), "/sys/class/gpio/gpio%d/edge", n); |
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
# | |
# mlib: common client js routines v0.5.0 | |
# m@penzin.ru | |
# | |
# -- globals -- | |
window.lib = x = {} | |
# window._csrf used as token, replaced by _csrf cookie if empty |
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
// | |
// http://playground.arduino.cc/Learning/OneWire | |
// | |
#include <OneWire.h> | |
#define ONEWIRE_PIN 2 | |
OneWire ds(ONEWIRE_PIN); |
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
Y = 0.21*R + 0.72*G + 0.07*B > 80% for light background | |
https://events.yandex.ru/lib/talks/2491/ | |
(7:38) |
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
# | |
# xorg.conf @ black | |
# | |
#Section "Device" | |
# Identifier "aticonfig-Device[0]" | |
# Driver "fglrx" | |
## Driver / Performance Options | |
# Option "XAANoOffscreenPixmaps" "true" | |
# Option "TexturedVideo" "On" |
OlderNewer