Skip to content

Instantly share code, notes, and snippets.

View SergXIIIth's full-sized avatar

Sergey Makridenkov SergXIIIth

View GitHub Profile
@SergXIIIth
SergXIIIth / header.sass
Created September 13, 2014 05:19
Sass with @extend - no additional class in HTML
.header
@extend .container
.brand
float: left
span
+text-hide
.links
<object id="videoplayer354" type="application/x-shockwave-flash" data="http://localhost:3000/player/uppod.swf" width="500" height="375">
<param name="bgcolor" value="#3333" />
<param name="allowFullScreen" value="true" />
<param name="allowScriptAccess" value="always" />
<param name="movie" value="http://localhost:3000/player/uppod.swf" />
<param name="flashvars" value="comment=Video&amp;st=http://localhost:3000/player/st/video205-524.txt&amp;file=http://localhost:3000/video.mp4" />
</object>
@SergXIIIth
SergXIIIth / gist:ee705b2e0798d2ca0950
Created October 27, 2015 16:29
Crystal perfomance
$ crystal build src/hello.cr --release
$ time ./hello
Hello world
real 0m0.003s
user 0m0.000s
sys 0m0.004s
$ time ruby hello.rb
require "./sev/*"
module Sev
puts "Hello"
@[Link("m")]
@[Link("avcodec")]
@[Link("avformat")]
lib AvFormat
fun av_register_all
@SergXIIIth
SergXIIIth / probe.c
Created November 6, 2015 08:16
Take metadata from video
// gcc src/decoder.c -lavcodec -lavformat
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
int main(int argc, char *argv[]) {
char *filename = "/home/msa/Videos/Cowspiracy.2014.1080p-EGN.mkv";
av_register_all();