Skip to content

Instantly share code, notes, and snippets.

View kfigiela's full-sized avatar

Kamil Figiela kfigiela

View GitHub Profile
@kfigiela
kfigiela / testapp.rb
Last active December 17, 2015 07:59
Test app for lab
#!/usr/bin/ruby
require 'rubygems' # required for ruby 1.8
require 'sinatra'
require 'socket'
host = Socket.gethostname
get '/ok' do
"#{host}\n#{Date.new}"
end
@kfigiela
kfigiela / gist:7081994
Created October 21, 2013 10:53
ffmpeg timelapse / image sequence with video fade in and fade out and audio fade out commandline
ffmpeg -r 20 # input frame rate \
-i "%05d.JPG" # input file pattern \
-i audio.mp3 # input audio file \
-af "afade=t=out:st=132:d=4" # fade out audio for 4 seconds starting at 132 second \
-vf "fade=in:0:40, fade=out:2694:40" # fade in video in first 40 frames, then fade out for 40 frames starting at frame 2694 \
-r 30 # out frame rate is 30s (in that way youtube allows hd movies) \
-s 1280x720 # resize video to hd-ready res \
-vcodec libx264 -threads 4 -profile:v main -preset fast # video encoding settings \
-shortest # output file length should be of shortest input file length (usually audio file will be longer, so we fade out and cut) \
output.mp4 #output file name
%setA set < A B C >
%setB set < X Y >
%setC_relation set[2] <
X A
X B
Y C
>
#!/usr/bin/env ruby
require 'benchmark'
require 'yaml'
commands = File.open(ARGV[0], 'r') do |file|
file.readlines
end.map(&:strip)
results = []
@kfigiela
kfigiela / gist:8570788
Created January 23, 2014 01:00
idDHTLib for mbed example
Ticker dhtTicker, lcdTicker;
void dhtWrapper();
idDHTLib DHTLib(PTD7, dhtWrapper);
void dhtWrapper(){
DHTLib.dht22Callback(); // change do dht11Callback if needed
}
void readDht() {
@kfigiela
kfigiela / bootstrap.sh
Created February 18, 2014 17:32
Montage bootstrap script
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 DEGREE"
exit 1
fi
SURVEY=2mass
OBJ=M42
BAND=j
@kfigiela
kfigiela / gist:9913871
Created April 1, 2014 13:21
Denon hc4500 mbed midi parser
void track_name(char lcd_col, char lcd_row, char lcd_data);
char tn_byteA, tn_byteB;
void show_message(MIDIMessage msg) {
char tn_output, tn_byte2;
if(msg.type() == MIDIMessage::ControlChangeType && msg.channel() == 0) {
if(msg.controller() >= 0x00 && msg.controller() <= 0x0D) {
tn_byteA = (msg.value() << 4);
} else if(msg.controller() >= 0x0E && msg.controller() <= 0x19) {
tn_byteB = (msg.value() << 4);
@kfigiela
kfigiela / Denon_RC-1163_lircd.conf
Last active October 5, 2018 15:15
LIRC config file for Denon RC-1163 remote for DRA-F109/DNP-F109/DCD-F109
# contributed by Kamil Figiela
#
# brand: Denon
# model no. of remote control: RC-1163
# devices being controlled by this remote: DRA-F109/DNP-F109/DCD-F109
#
# DRA-F109 has also serial port in its "Remote Connector" that provides better integration.
# See blog post for more information: http://kfigiela.github.io/2014/06/15/denon-remote-connector/
begin remote

Amoniaczki

  • 0.5 kg mąki
  • 12 dag cukru pudru
  • 8 dag margaryny
  • 2 żółtka + 1 całe jajo (a białka do posmarowania)
  • cukier waniliowy
  • Bełtamy (wysiekac margaryne) wszystko poza śmietaną i amoniakiem (dac amoniak do smietany, ma sie spienic) - wygniesc, zwałkować na 0.5 cm, wycinam, białkiem, cukrem i do pieca
  • 250ml śmietany 18%
  • 1 dag amoniaku