Skip to content

Instantly share code, notes, and snippets.

View maksadbek's full-sized avatar
💭
Chilling

maksadbek

💭
Chilling
View GitHub Profile
'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...
Подкину литературы, ссылок, дабы была подмога в выборе области.
А то, в каком порядке изучать - так образование трудно облачить в алгоритм. Необходимо знать немного о всем и все о немногом. Главное чтобы пёрло и была поддержка в лице единомышленников.
Из того, на что обязательно нужно взглянуть.
Математика (база, во всех ее проявлениях):
Кнут Искусство программирования
Вирт Алгоритмы + структуры данных = программы
Ахо,Лам,Сети,Ульман - Компиляторы. Принципы, технологии, инструменты.
Кормен. Алгоритмы. Построение и анализ.
<?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));
<?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));
#!/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&copy_history_depth=2"
response = urllib2.urlopen(url)
text = response.read()
# 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
<?php
$RATEREMAIN = 60;
$RESETIME = 1;
$APIKEY = $_SERVER["HTTP_APIKEY"];
$IP = $_SERVER["REMOTE_ADDR"];
define("MYSQLHOST", "127.0.0.1");
define("MYSQLPORT", "3306");
# 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
class ApplicationController < ActionController::Base
...
before_filter :throttle
def throttle
client_ip = request.env["REMOTE_ADDR"]
key = "count:#{client_ip}"
count = REDIS.get(key)
#! /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'