Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776 | |
$ cd /usr/src | |
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz | |
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz | |
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz | |
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz | |
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz |
<?php | |
if (file_exists('sig1.php')) { | |
unlink('sig1.php'); | |
} | |
function quality($itag) { | |
switch ($itag) { | |
case "17": | |
return "144P"; | |
break; | |
case "278": |
from selenium import webdriver | |
import time | |
# JavaScript: HTML5 Drag and drop script | |
# param1 (WebElement): Source element to drag | |
# param2 (WebElement): Optional - target element for the drop | |
# param3 (int): Optional - Drop offset x relative to the target if any or source element | |
# param4 (int): Optional - Drop offset y relative to the target if any or source element | |
# param4 (int): Optional - Delay in milliseconds (default = 1ms) for dragging and dropping | |
# param5 (string): Optional - Key pressed (alt or ctrl or shilf) |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
$INSTALL_REDIS = <<SCRIPT | |
sudo apt-get update | |
sudo apt-get upgrade | |
sudo apt-get install -y redis-server |
sudo sed -e 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read|write" pattern="PDF" \/>\n\ \ <policy domain="coder" rights="read|write" pattern="LABEL" \/>/' -i /etc/ImageMagick/policy.xml |
module RetryableTyphoeus | |
require 'typhoeus' | |
include Typhoeus | |
DEFAULT_RETRIES = 1 | |
class Request < Typhoeus::Request | |
def original_on_complete=(proc) | |
@original_on_complete = proc |
#! /usr/bin/env ruby | |
require 'rspec' | |
require 'forwardable' | |
# This is a cleaner implementation of Forwardable. It does not use string evaluation, | |
# nor does it have any rescues in it. This code grew out of a discussion at RubiABQ | |
# http://www.meetup.com/Rubyists-in-Albuquerque/events/225108828/ | |
module MyForwardable |
You requested maxclients of 10000 requiring at least 10032 max file descriptors.
Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
# Optimized my.cnf configuration for MySQL/MariaSQL | |
# | |
# by Fotis Evangelou, developer of Engintron (engintron.com) | |
# | |
# ~ Updated January 2020 ~ | |
# | |
# | |
# The settings provided below are a starting point for a 2GB - 4GB RAM server with 2-4 CPU cores. | |
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage. | |
# |