This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
import sys, signal, httplib, urllib, json | |
# Ловим ^C | |
def user_interrupt(signal, frame): | |
sys.exit(0) | |
signal.signal(signal.SIGINT,user_interrupt) | |
kiev = "2200001" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add multimedia source | |
echo "deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
echo "deb-src http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install deb-multimedia-keyring # if this aborts, try again | |
apt-get update | |
# Go to local source directory | |
cd /usr/local/src |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
youtube="rtmp://a.rtmp.youtube.com/live2/username.0000-1111-2222-3333" | |
ustream="rtmp://0.1234.fme.ustream.tv/ustreamVideo/1234/abcdefghijklmnopqrstuvwxyz1234567890" | |
local_720p="rtmp://localhost:1935/output/720p" | |
local_1080p="rtmp://localhost:1935/output/1080p" | |
logfile="/tmp/avconv.log" | |
on_die () { | |
pkill -KILL -P $$ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
worker_processes 4; | |
events { | |
worker_connections 1024; | |
} | |
rtmp { | |
server { | |
listen 1935; | |
application input { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ID OAuth клиента | |
$OAUTH2_CLIENT_ID = ''; | |
// Ключ OAuth клиента | |
$OAUTH2_CLIENT_SECRET = ''; | |
// URL для приема токена | |
$TOKEN_SAVE_URL = 'http://' . $_SERVER['HTTP_HOST'] . '/'; | |
// URL для переадресации после авторизации | |
$REDIRECT_URL = 'http://' . $_SERVER['HTTP_HOST'] . '/'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<body> | |
<?php | |
$APP_ID = ''; | |
$APP_SECRET = ''; | |
$REDIRECT_URL = 'http://' . $_SERVER['HTTP_HOST'] . '/'; | |
set_include_path('facebook-php-sdk'); | |
require_once 'autoload.php'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# Script for querying remaining places from UZ | |
# Requires curl, grep, jq and nodejs | |
LANG="en" | |
DESCRIPTION="Script for querying remaining places from UZ" | |
USAGE="Usage: $(basename "${0}") <start_station> <end_station> [MM.DD.YYYY]" | |
DEPENDENCIES="Please make sure that curl, grep, jq and Node.JS are installed" | |
CURL=$(command -v "curl") | |
GREP=$(command -v "grep") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.script.ScriptEngine; | |
import javax.script.ScriptEngineManager; | |
import javax.script.ScriptException; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
import java.text.MessageFormat; | |
import java.text.SimpleDateFormat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install Oracle XE on CentOS 7 | |
yum install -y libaio bc net-tools | |
rpm -i oracle-xe-11.2.0-1.0.x86_64.rpm | |
/etc/init.d/oracle-xe configure | |
firewall-cmd --add-port 1521/tcp --permanent | |
firewall-cmd --reload | |
echo "ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe" > /etc/profile.d/oracle-xe.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chkconfig: - 80 20 | |
# description: Start/stop script for Tomcat | |
# Source function library. | |
. /etc/rc.d/init.d/functions | |
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network | |
[ "${NETWORKING}" = "no" ] && exit 0 |
OlderNewer