Skip to content

Instantly share code, notes, and snippets.

View peko's full-sized avatar

Vladimir Seregin peko

  • https://peko.github.io/about
  • Frankfurt
View GitHub Profile
# ./app.sh (git)-[master]
Wed Aug 27 16:38:23.792 [initandlisten] MongoDB starting : pid=9088 port=50000 dbpath=./.meteor/local/db 64-bit host=vs43
Wed Aug 27 16:38:23.792 [initandlisten]
Wed Aug 27 16:38:23.792 [initandlisten] ** WARNING: You are running in OpenVZ. This is known to be broken!!!
Wed Aug 27 16:38:23.792 [initandlisten]
Wed Aug 27 16:38:23.792 [initandlisten] db version v2.4.10
Wed Aug 27 16:38:23.792 [initandlisten] git version: e3d78955d181e475345ebd60053a4738a4c5268a
Wed Aug 27 16:38:23.792 [initandlisten] build info: Linux ip-10-2-29-40 2.6.21.7-2.ec2.v1.2.fc8xen #1 SMP Fri Nov 20 17:48:28 EST 2009 x86_64 BOOST_LIB_VERSION=1_49
Wed Aug 27 16:38:23.792 [initandlisten] allocator: tcmalloc
Wed Aug 27 16:38:23.792 [initandlisten] options: { dbpath: "./.meteor/local/db", port: 50000, setParameter: [ "textSearchEnable
@peko
peko / gist:3410a6d7326a6c69b871
Created November 30, 2014 19:52
ffmpeg blending log
> ffmpeg \
> -i background.mp4 \
> -loop 1 -f image2 -i transparent-overlay.png \
> -shortest -y \
> -filter_complex "[1:0][0:0]blend=all_mode=average" \
> overlay.mp4
ffmpeg version 2.4.3- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2014 the FFmpeg developers
built on Nov 4 2014 13:14:24 with gcc 4.8 (Debian 4.8.3-13)
configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --disable-ffserver --enable-libass --enable-gnutls --cc=gcc-4.8
@peko
peko / gist:735a695f2cdd5d4c3b9d
Created January 28, 2015 16:59
Stream to twitch
#!/bin/bash
INRES="2560x1600"
OUTRES="640x400"
FPS="30"
QUAL="slower" #ultrafast,superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo
STREAM_KEY=$(cat ~/.twitch_key) # This is your streamkey generated by jtv/twitch found at: http://www.justin.tv/broadcast/adv_other
avconv \
-f x11grab -s $INRES -r "$FPS" -i :0.0 \
grab = (tag)->
console.log "grab #{tag}"
min_id = 0
#min_id = if lastid[tag] then lastid[tag] else 0
# console.log "https://api.instagram.com/v1/tags/#{tag}/media/recent?client_id=#{cid}&client_secret=#{sec}&max_id=#{min_id}"
@peko
peko / gist:2e1825af12a579fd9310
Created June 30, 2015 22:11
200M Random words
package main
import (
"crypto/rand"
"fmt"
// "strconv"
)
const total = 200000000
[
{ "keys": ["alt+n"], "command": "move", "args": {"by": "characters", "forward": false} },
{ "keys": ["alt+e"], "command": "move", "args": {"by": "lines", "forward": true} },
{ "keys": ["alt+o"], "command": "move", "args": {"by": "lines", "forward": false} },
{ "keys": ["alt+i"], "command": "move", "args": {"by": "characters", "forward": true} },
{ "keys": ["shift+alt+n"], "command": "move", "args": {"by": "characters", "forward": false, "extend": true} },
{ "keys": ["shift+alt+i"], "command": "move", "args": {"by": "characters", "forward": true, "extend": true} },
{ "keys": ["shift+alt+o"], "command": "move", "args": {"by": "lines", "forward": false, "extend": true} },
{ "keys": ["shift+alt+e"], "command": "move", "args": {"by": "lines", "forward": true, "extend": true} },
{ "keys": ["ctrl+alt+o"], "command": "select_lines", "args": {"forward": false} },
variants = {}
for i in [1000..9999]
c = "#{i}"
sum = parseInt(c[0]) + parseInt(c[1]) + parseInt(c[2]) + parseInt(c[3])
if c.search(0)<0 and sum is 10
n = c.split('').sort().join('')
variants[n]?=0
variants[n]++
c = 0
@peko
peko / fff.c
Created October 19, 2015 15:45
#include <stdio.h>
int a(int v) {
return v*v*v;
}
int (*b())(int) {
return a;
}
@peko
peko / gdb.txt
Last active November 28, 2015 20:07
комманды
компилируем с флагом -g
запускаем 'gdb prog'
break fоо - останов на функции
start - запускаем выполнение
list - показывает исходник
enter - повторяет предидущую операцию
step - сделать один шаг
next - сделать шаг без вход в фунцкию
print|p var - выводит переменную в скопе
package main
import (
"bytes"
"encoding/base64"
"encoding/binary"
"flag"
"fmt"
"math/rand"
"os"