Skip to content

Instantly share code, notes, and snippets.

Marcel Šulek veproza

Block or report user

Report or block veproza

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@veproza
veproza / setup.php
Last active Aug 25, 2018
TeamCity output including test duration for Nette Tester. Requires a custom Tester fork: https://github.com/veproza/tester (or just this commit: https://github.com/veproza/tester/commit/d3f4ad2c500d2b927eb372ec2be9b2f594bec9bc)
View setup.php
<?php
/**
* By jiripudil, https://github.com/jiripudil/intellij-nette-tester/blob/master/resources/setup.php
* @license https://github.com/jiripudil/intellij-nette-tester/blob/master/LICENSE.md
*/
use Tester\Runner\Runner;
final class TeamCityOutputHandler implements \Tester\Runner\StartAwareOutputHandler
{
@veproza
veproza / setup.php
Created Aug 25, 2018
A Setup.php file compatible with current (2.0) Nette Tester
View setup.php
<?php
/**
* By jiripudil, https://github.com/jiripudil/intellij-nette-tester/blob/master/resources/setup.php
* @license https://github.com/jiripudil/intellij-nette-tester/blob/master/LICENSE.md
*/
use Tester\Runner\Runner;
final class TeamCityOutputHandler implements \Tester\Runner\OutputHandler
{
View keybase.md

Keybase proof

I hereby claim:

  • I am veproza on github.
  • I am marcelsulek (https://keybase.io/marcelsulek) on keybase.
  • I have a public key ASArTBEn22J62nv9EVwhcV9ribN8k9YzMCuBk7ZXLjs-Mgo

To claim this, I am signing this object:

@veproza
veproza / accelerometer.ino
Last active Aug 29, 2015
Accelerometer sampled at 1kHz, saved to SD card
View accelerometer.ino
// Based on MPU-6050 Short Example Sketch
// By Arduino User JohnChi
// August 17, 2014
// Public Domain
#include <Wire.h>
#include <TimerOne.h>
#include <SD.h>
#include <SPI.h>
@veproza
veproza / AGPS.md
Last active Aug 28, 2019
Getting u-blox MAX-7C GPS to work with Assisted A-GPS
View AGPS.md

Getting u-blox MAX-7C GPS to work with Assisted A-GPS

So you got your u-blox GPS and wired it up only to look at it struggling to get a valid fix? Under less than ideal conditions, it can take a better part of half an hour. That's because unlike your smartphone GPS, it doesn't have the luxury of having downloaded all the auxiliary navigation data (almanacs and the lot) out-of-band, via fast mobile connection. Instead it relies on the satellite's signal itself, which is being transmitted to you at meager 50 bits per second (I'm not missing "kilo" there, it's three orders of magnitude slower than your 2G GPRS connection).

Luckily, the u-blox receivers are fitted with what the company calls "AssistNow" capability and it does exactly the same thing your iPhone does - feeds the GPS with pre-downloaded almanacs, speeding up the acquisition process to mere seconds.

In principle, the process looks easy enough - we just need to download the data, and then push them to the receiver. Sadly, the AssistNow documentat

@veproza
veproza / seeker
Created Aug 16, 2014
Skript na samplovani disku po 0.5MB a sledovani, zda v samplu jsou same nuly (priblizne)
View seeker
#!/bin/bash
for i in {0..1000000}
do
let skip=$i*1024
dd if=/dev/sdb count=1 skip=$skip | wc -w >> output
done
View vilnius-d3
<html>
<head>
<title>My D3 Page</title>
<style>
svg {background: #aaa;}
</style>
</head>
<body>
<svg width='400' height='400'>
<circle cx="0" cy="0" r="0" stroke="black" stroke-width="3" fill="red" />
@veproza
veproza / Package.ls
Created Nov 12, 2013
Jednoduchá in-memory cache pro Node.js - Package a servisní třída pro HTTP request - Request
View Package.ls
require! {
zlib
async
events.EventEmitter
}
module.exports = class Package extends EventEmitter
->
@type = "text/plain"
@lastModified = null
@content =
You can’t perform that action at this time.