This file contains 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
'Pure-FTPD + pureadmin (Ftp server with gui) | |
'Install ''Pure-FTPD'' with GUI | |
'Install the pure-ftpd package and the pureadmin package from the Universe Repository. | |
sudo apt-get install pure-ftpd pureadmin | |
'Then use your favorite text editor and open up the /etc/inetd.conf file. Comment (add a # at the start of) the line containing 'ftp'. 'Command example for text editor GEdit... | |
sudo gedit /etc/inetd.conf | |
'Again use your favorite text editor and open up the /etc/default/pure-ftpd-common file. Change STANDALONE_OR_INETD=inetd to 'STANDALONE_OR_INETD=standalone. Command example for text editor GEdit... |
This file contains 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
Подкину литературы, ссылок, дабы была подмога в выборе области. | |
А то, в каком порядке изучать - так образование трудно облачить в алгоритм. Необходимо знать немного о всем и все о немногом. Главное чтобы пёрло и была поддержка в лице единомышленников. | |
Из того, на что обязательно нужно взглянуть. | |
Математика (база, во всех ее проявлениях): | |
Кнут Искусство программирования | |
Вирт Алгоритмы + структуры данных = программы | |
Ахо,Лам,Сети,Ульман - Компиляторы. Принципы, технологии, инструменты. | |
Кормен. Алгоритмы. Построение и анализ. |
This file contains 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 | |
$ghost = 'xx.xx.xx.xx'; | |
$guser = 'xxxxxxxx'; | |
$gpwd = 'xxxxxxx'; | |
$gdbname = 'xxxxxxxx'; | |
$db = mysql_connect($ghost, $guser, $gpwd) or die("Could not connect: " . mysql_error()); | |
mysql_select_db ($gdbname, $db) or die (mysql_error($db)); |
This file contains 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 | |
$ghost = 'XXX.XXX.XXX.XXX'; | |
$guser = 'USER_NAME'; | |
$gpwd = 'PASSWORD'; | |
$gdbname = 'DB_NAME'; | |
$db = mysql_connect($ghost, $guser, $gpwd) or die("Could not connect: " . mysql_error()); | |
mysql_select_db ($gdbname, $db) or die (mysql_error($db)); |
This file contains 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/python | |
# -*- coding: utf-8 -*- | |
import urllib2 | |
import ast | |
import re | |
def get_items_of_post(address): | |
url = "https://api.vk.com/method/wall.getById?posts=" + address + "&extended=1©_history_depth=2" | |
response = urllib2.urlopen(url) | |
text = response.read() |
This file contains 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
# Author: Pieter Noordhuis | |
# Description: Simple demo to showcase Redis PubSub with EventMachine | |
# | |
# Update 7 Oct 2010: | |
# - This example does *not* appear to work with Chrome >=6.0. Apparently, | |
# the WebSocket protocol implementation in the cramp gem does not work | |
# well with Chrome's (newer) WebSocket implementation. | |
# | |
# Requirements: | |
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby |
This file contains 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 | |
$RATEREMAIN = 60; | |
$RESETIME = 1; | |
$APIKEY = $_SERVER["HTTP_APIKEY"]; | |
$IP = $_SERVER["REMOTE_ADDR"]; | |
define("MYSQLHOST", "127.0.0.1"); | |
define("MYSQLPORT", "3306"); |
This file contains 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
# A shortcut function that simplifies usage of xclip. | |
# - Accepts input from either stdin (pipe), or params. | |
# ------------------------------------------------ | |
cb() { | |
local _scs_col="\e[0;32m"; local _wrn_col='\e[1;31m'; local _trn_col='\e[0;33m' | |
# Check that xclip is installed. | |
if ! type xclip > /dev/null 2>&1; then | |
echo -e "$_wrn_col""You must have the 'xclip' program installed.\e[0m" | |
# Check user is not root (root doesn't have access to user xorg server) | |
elif [[ "$USER" == "root" ]]; then |
This file contains 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
class ApplicationController < ActionController::Base | |
... | |
before_filter :throttle | |
def throttle | |
client_ip = request.env["REMOTE_ADDR"] | |
key = "count:#{client_ip}" | |
count = REDIS.get(key) |
This file contains 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/python3.2 | |
from ws4py.client.threadedclient import WebSocketClient | |
import time | |
import subprocess | |
import logging | |
import logging.handlers | |
LOG_FILENAME = '/var/log/run_taxi_deamon.log' |