Skip to content

Instantly share code, notes, and snippets.

write(1, "BANG!", 5) = 5
write(1, "\n", 1) = 1
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC, 0) = 29
connect(29, {sa_family=AF_LOCAL, sun_path="/run/wayland-0"}, 17) = 0
gettid() = 4330
epoll_ctl(4, EPOLL_CTL_ADD, 29, {EPOLLIN|EPOLLPRI|EPOLLOUT|EPOLLERR, {u32=3069366600, u64=3069366600}}) = 0
stat64("/usr/share/X11/xkb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/usr/share/X11/xkb", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
geteuid32() = 0
getegid32() = 0
/* -*- mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
#include <errno.h>
#include <sys/un.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/select.h>
@steelman
steelman / metar-timezone-test.lua
Created May 2, 2015 10:17
Test for timestamp parsing in metar.lua library
-- This is a code to test timestamp parsing in metar.lua library[1].
-- The original version (up to d99521d5) failed because mktime(3)
-- and os.date() expect local time as input.
--
-- [1] https://github.com/steelman/metar
function print_now(now)
print (string.format('now => %d', now))
print (string.format("local: %s",os.date('%Y-%m-%d %H:%M:%S', now)))
print (string.format("UTC: %s",os.date('!%Y-%m-%d %H:%M:%S', now)))
end
vendors:
-
# while read url; do echo -n "$url "; curl -s -L --limit-rate 0 $url | grep -o KUP.TERAZ || echo ""; done
name: "abc-rc"
currency: PLN
url: http://abc-rc.pl
shipping: "lambda x: 12.50 if (reduce(lambda y,z: y + z.price, x, 0.0) < 50.0) else 19.00"
products:
-
name: "XT60"