Skip to content

Instantly share code, notes, and snippets.

View ArseniyShestakov's full-sized avatar

Arseniy Shestakov ArseniyShestakov

View GitHub Profile
@ArseniyShestakov
ArseniyShestakov / 0_reuse_code.js
Created May 12, 2017 20:51
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ArseniyShestakov
ArseniyShestakov / test.go
Last active March 20, 2017 02:22
VCMI automated testing PoC
package main
import (
"fmt"
_"flag"
_"time"
"strings"
"compress/gzip"
"io/ioutil"
"path/filepath"
@ArseniyShestakov
ArseniyShestakov / gist:bdd6ca7436ecc2c99b102ae723c36453
Created March 19, 2017 20:02
Just random website price parser
<?php
define('TAB', ' ');
$pizz = array(
"30cm" => "http://www.pizzmaster.ru/shop/pizza-30sm",
"40cm" => "http://www.pizzmaster.ru/shop/pizza-40sm",
"12" => "http://www.pizzmaster.ru/shop/polovinka-pizz",
"to" => "http://www.pizzmaster.ru/shop/picca-40sm-na-tonkom-korzhe",
"it" => "http://www.pizzmaster.ru/shop/picca-40sm-na-italjanskom-teste"
);
@ArseniyShestakov
ArseniyShestakov / knigi.php
Created November 27, 2016 23:44
Some crappy parser in php
<meta name="referrer" content="no-referrer" />
<form action="mAx-knigi.php" method="post">
URL: <input type="text" name="url"><br>
<input type="submit" value="Submit">
</form><br><br>
<?php
if(isset($_POST['url']) && strlen($_POST['url']) > 10)
{
$url = parse_url($_POST['url'], PHP_URL_PATH);
$page = file_get_contents('https://domain/'.$url);
@ArseniyShestakov
ArseniyShestakov / 0_README.txt
Created September 29, 2016 22:02
VCMI Deploy scripts
# as root
sudo -i
mkdir /opt/vcmi/
# Then copy files and set execution permissions
chmod +x /opt/vcmi/switchFiles.sh
chmod +x /opt/vcmi/changeLinks.sh
# Run this one as root:
/opt/vcmi/switchFiles.sh
@ArseniyShestakov
ArseniyShestakov / add.sh
Last active August 25, 2023 14:14
My compiler alternatives
# Cleanup old alternatives
update-alternatives --remove-all cc
update-alternatives --remove-all c++
update-alternatives --remove-all gcc
update-alternatives --remove-all g++
update-alternatives --remove-all clang
update-alternatives --remove-all clang++
update-alternatives --remove-all icc
update-alternatives --remove-all icc++
@ArseniyShestakov
ArseniyShestakov / README.txt
Created September 12, 2016 00:45
VCMI Duel mode minimal config
Source:
http://wiki.vcmi.eu/index.php?title=Opis_zadania_%E2%80%94_bitewne_AI_dla_VCMI
@ArseniyShestakov
ArseniyShestakov / FOOTER.html
Last active June 14, 2022 03:29
VCMI daily builds Nginx config
@ArseniyShestakov
ArseniyShestakov / vcmiclient.supp
Last active August 22, 2016 02:51
VCMI suppression file for Valgrind Memcheck
{
<insert_a_suppression_name_here>
Memcheck:Param
writev(vector[...])
...
obj:/usr/lib/*/libxcb*
...
}
{
<insert_a_suppression_name_here>
@ArseniyShestakov
ArseniyShestakov / sound-streaming.txt
Created August 10, 2016 11:51
Sound streaming over ethernet
Multicast:
cvlc --live-caching 1 -vvv pulse://Mine.monitor --sout '#transcode{acodec=s16b,samplerate=44100}:rtp{dst=192.168.128.159,port=5000,caching=1,sdp=rtsp://192.168.128.159:8080/test.sdp}'
cvlc rtsp://192.168.128.159:8080/test.sdp --network-caching=0
Unicast:
cvlc --live-caching 1 -vvv pulse://Mine.monitor --sout '#rtp{dst=192.168.128.150,port=50001,sdp=rtsp://192.168.128.159:8080/test.sdp,caching=1}'
cvlc rtp://@:50001