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
local nixio = require 'nixio' | |
local bit = require 'bit' | |
local uloop = require 'uloop' | |
local ipmi = require 'ipmi' | |
local sub = string.sub | |
local byte = string.byte | |
local band = bit.band | |
uloop.init() |
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
local bin = require 'struct' | |
local bit = require 'bit' | |
local nixio = require 'nixio' | |
local ffi = require 'ffi' | |
local fopen = nixio.open | |
local hash = nixio.crypto.hash | |
local stpack, stunpack = bin.pack, bin.unpack | |
local bor, band, bxor, lshift, rshift = bit.bor, bit.band, bit.bxor, bit.lshift, bit.rshift | |
local byte, sub = string.byte, string.sub |
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
#!/bin/bash | |
mkdir -p /tmp/im.$$ | |
curl -s http://data.mos.ru/opendata/export/2002/csv | funzip -p | iconv -fcp1251 | | |
gawk -F ";" -vyes=0 -vno=0 -vunk=0 -vspecial=0 -vtotal=0 -vday=-1 ' | |
NR % 2 == 0 { | |
d=$3 " " $4 | |
gsub(/\./, "/", d) | |
d=gensub(/\//, " ", 3, d) |
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
#ifndef CONFIG_LOCAL_GENERAL_H | |
#define CONFIG_LOCAL_GENERAL_H | |
/** @file | |
* | |
* General configuration | |
* | |
*/ | |
FILE_LICENCE ( GPL2_OR_LATER ); |
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
#!/bin/sh -e | |
wd=$PWD/$1 | |
prj=http://crowdgorod.mos.ru | |
[ -n "$1" ] || exit 1 | |
# Если ещё не получили список предложений, | |
# создаём рабочую директорию и загружаем предложения |
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
use std::io::println; | |
fn main() { | |
let m : [u8, ..1] = [ 0u8 ]; | |
println(format!("{}", ((m[0] >> 8) | 0) as u16)); | |
println(format!("{}", ((m[0] >> 8) | m[0]) as u16)); | |
assert!((((m[0] >> 8) | 0) as u16) == 0); | |
assert!((((m[0] >> 8) | m[0]) as u16) == 255); | |
} |