Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Demidov AlexeyDemidov

View GitHub Profile
@erikig
erikig / common-domain-prefix-suffix-list.tsv
Last active Nov 27, 2020
Top 5000 Most Common Domain Prefix/Suffix List - Courtesy LeanDomainSearch - https://leandomainsearch.com/top-domain-name-prefixes-and-suffixes/
View common-domain-prefix-suffix-list.tsv
Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+
@indirect
indirect / better_logger.rb
Created Jul 19, 2011
Rails 3 logs with severity and PIDs
View better_logger.rb
# You must require this file in application.rb, above the Application
# definition, for this to work. For example:
#
# # Syslog-like Rails logs
# if Rails.env.production?
# require File.expand_path('../../lib/better_logger', __FILE__)
# end
#
# module MyApp
# class Application < Rails::Application
View gist:534668
# Our own variable where we deploy this app to
deploy_to = "/srv/example.com"
current_path = "#{deploy_to}/current"
shared_path = "#{deploy_to}/shared"
shared_bundler_gems_path = "#{shared_path}/bundler_gems"
# See http://unicorn.bogomips.org/Sandbox.html
# Helps ensure the correct unicorn_rails is used when upgrading with USR2
Unicorn::HttpServer::START_CTX[0] = "#{shared_bundler_gems_path}/bin/unicorn_rails"
@mala
mala / memcachedos.pl
Created Aug 13, 2010
DoS for memcached
View memcachedos.pl
#!/usr/local/bin/perl
# DoS tool for memcached
# ulimit -n 15000; perl memcachedos.pl 127.0.0.1 11211 3
# original: http://gist.github.com/522741
# This is Public Domain Software
use strict;
use warnings;
use AnyEvent;
@vvalgis
vvalgis / Capistrano tasks for starting unicorn.rb
Created May 7, 2010
Capistrano tasks for starting unicorn
View Capistrano tasks for starting unicorn.rb
set :rails_env, :production
set :unicorn_binary, "/usr/bin/unicorn"
set :unicorn_config, "#{current_path}/config/unicorn.rb"
set :unicorn_pid, "#{current_path}/tmp/pids/unicorn.pid"
namespace :deploy do
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && #{try_sudo} #{unicorn_binary} -c #{unicorn_config} -E #{rails_env} -D"
end
task :stop, :roles => :app, :except => { :no_release => true } do
View gist:308216
#!/bin/sh
set -u
set -e
# Example init script, this can be used with nginx, too,
# since nginx and unicorn accept the same signals
# Feel free to change any of the following variables for your app:
APP_ROOT=/home/deploy/public_html/rm/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
ENV=production
@weppos
weppos / capistrano_database_yml.rb
Created Jul 27, 2008
Provides a couple of tasks for creating the database.yml configuration file dynamically when deploy:setup is run.
View capistrano_database_yml.rb
#
# = Capistrano database.yml task
#
# Provides a couple of tasks for creating the database.yml
# configuration file dynamically when deploy:setup is run.
#
# Category:: Capistrano
# Package:: Database
# Author:: Simone Carletti <weppos@weppos.net>
# Copyright:: 2007-2010 The Authors
You can’t perform that action at this time.