Skip to content

Instantly share code, notes, and snippets.

apt-get -y update
apt-get -y install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties nodejs nginx-full redis-server postgresql postgresql-server-dev-9.4 mc wget imagemagick
adduser app
sudo su - app
ssh-keygen -t rsa -b 4096
ssh -T git@github.com
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source .bash_profile
c.Writer.Header().Set("Access-Control-Allow-Origin", "*")
c.Writer.Header().Set(
"Access-Control-Allow-Methods",
"POST, GET, OPTIONS, PUT, PATCH, DELETE")
c.Writer.Header().Set(
"Access-Control-Allow-Headers",
"Content-Type, Content-Length, Accept-Encoding, X-Original-Filename, X-Access-Token, Authorization")
if c.Request.Method == "OPTIONS" {
c.Abort(200)
return
window && (window.__markets = [
{
name: 'markets.main.pass'
group_id: 1
template: 'simple_options_list'
rows: [
{ title: 'markets.main.pass_home', name: 'coeff_QS_1'}
{ title: 'markets.main.pass_away', name: 'coeff_QS_2'}
]
}
www@Ubuntu-1304-raring-64-minimal:~/rush$ ruby daemons/collector.rb
I, [2014-03-27T18:54:03.821568 #7141] INFO -- : running server on 0.0.0.0:3097
I, [2014-03-27T19:00:30.744193 #7141] INFO -- : new client [95.26.65.10:51732] connected
D, [2014-03-27T19:00:30.748926 #7141] DEBUG -- : > start/finish@Pong@$
D, [2014-03-27T19:00:30.749030 #7141] DEBUG -- : < Rush@AckPong@Version2.1@$
{
:id => "start/finish",
:method => "Pong",
:values => [],
:message_number => 0
Я – Анастасия Волочкова,
Папа мой – Порфирий Волочков,
Жизнь моя сложилась бестолково:
Я влюбляюсь только в мудаков
Это – в смысле, я влюбляюсь телом.
Потому, что сердцем и душой
Я люблю своё по жизни дело,
В смысле, сцену и театр Большой
upstream budo {
server 127.0.0.1:5000;
}
server {
listen 80;
server_name budo.ru;
root /home/www/budo.bugz.ru/current/public;
try_files $uri @budo;
namespace :unicorn do
set :unicorn_pid, "#{app_path}/tmp/pids/unicorn.pid"
desc "Restart unicorn"
task :restart => :environment do
queue %{
cd #{app_path}
test -s "#{unicorn_pid}" && kill -USR2 `cat "#{unicorn_pid}"` && echo "-----> Reload Ok" && exit 0
bundle exec unicorn -c #{app_path}/config/unicorn.rb -E #{rails_env} -D && echo "-----> Start Ok"
}
{
status: 'error'
errors: [
{
id: 1
priority: 1
message: 'Первое сообщение'
cfs: [{ cid: 1, value: 123}, {cid: 2, value: 123}]
}
{
@inferno
inferno / hlink.c
Created August 13, 2013 20:54
Create hard links for directory in OSX.
@inferno
inferno / _sprites.sass
Created August 6, 2013 17:26
Spriting technique for compass and auto width/height setup.
$parts: sprite-map("sprites/*.png", $layout: smart)
$parts_names: sprite_names($parts)
.sprite
+inline-block
background: $parts
background-repeat: no-repeat
@each $sprite in $parts_names
.sprite_#{$sprite}