Skip to content

Instantly share code, notes, and snippets.

View kovalev-org's full-sized avatar

Sergey Kovalev kovalev-org

View GitHub Profile
@kovalev-org
kovalev-org / web-servers.md
Created October 13, 2017 10:27 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@kovalev-org
kovalev-org / aws-cognito-authentication-demo.babel.js
Created January 19, 2017 07:05 — forked from sbussard/aws-cognito-authentication-demo.babel.js
how to authenticate an aws cognito user in the browser
import AWS from 'aws-sdk/global';
import S3 from 'aws-sdk/clients/s3';
import {
AuthenticationDetails,
CognitoUser,
CognitoUserPool,
} from 'amazon-cognito-identity-js';
const REGION = 'some-string-value';
const USER_POOL_ID = 'some-string-value';
@kovalev-org
kovalev-org / bitrix-env.sh
Created December 4, 2016 11:01 — forked from olegpro/bitrix-env.sh
bitrix-env.sh
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo -e "\e[1;31mThis script must be run as root or it will fail\e[0m" 1>&2
exit 1
fi
echo -e "\e[1;32mBitrix Environment for Linux installation script\e[0m" 1>&2
echo ""
echo -e "\e[1;32mYes will be assumed to answers, and will be defaulted. 'n' or 'no' will result in a No answer, anything else will be a yes.\e[0m"
@kovalev-org
kovalev-org / latest-ffmpeg-centos6.sh
Last active November 8, 2016 18:12 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
#!/bin/sh
#cd /usr/scr
rpm --import etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
yum install -y autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel freetype-devel speex-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
<a href='http://it-in.ru'>Разработано компанией it-in</a>, <a href='tel://+74995028023'>+7 (499) 502-80-23</a>, <a href='mailto:info@it-in.ru'>info@it-in.ru</a>
#!/bin/bash
aptitude install libapache2-mod-rpaf rsync
Разработка и техническая поддержка: Bx-store</br>
<a href='http://bx-store.ru'>http://bx-store.ru</a>; +7 (499) 502-80-23; <a href='mailto:info@bx-store.ru'>info@bx-store.ru</a>
@kovalev-org
kovalev-org / gist:5229072
Last active December 15, 2015 08:09
bbcode for it-in projects
[table][tr][td]Сайт с гордостью разработан в [/td][td][URL=http://bx-store.ru][IMG]http://it-in.ru/images/shared/logo-bx-store-179x40.png[/IMG][/URL][/td][/tr][tr][td]Адрес сайта:[/td][td][URL=http://xn--80akr1ac.com/]www.атлет.com[/URL][/td][/tr][tr][td]Сайт сдан:[/td][td]8 апреля 2013 г.[/td][/tr][tr][td]Ответственное лицо:[/td][td]Сергей Ковалев[/td][/tr][tr][td]E-mail:[/td][td][URL=mailto:info@bx-store.ru]info@bx-store.ru[/URL][/td][/tr][tr][td]Техническая поддержка:[/td][td][URL=http://it-in.ru/support/]http://it-in.ru/support/[/URL]
[URL=http://it-in.ru/clients/]http://it-in.ru/clients/[/URL][/td][/tr][/table]
#!/bin/bash
iptables -F
iptables -X
iptables -t nat -F
iptables -t nat -X
iptables -t mangle -F
iptables -t mangle -X
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
#!/bin/bash
echo 50000000 > /sys/devices/system/xenmgm/xenmgm0/memmin_bytes
echo 10000000 > /sys/devices/system/xenmgm/xenmgm0/reserve_free_bytes
echo 3 > /proc/sys/vm/drop_caches
sync