Skip to content

Instantly share code, notes, and snippets.

View wellington1993's full-sized avatar
🏠
Working from home

Wellington Torrejais da Silva wellington1993

🏠
Working from home
View GitHub Profile
@wellington1993
wellington1993 / gist:f9b598b4fdcc8f904090
Created March 15, 2016 11:57
An unhandled lowlevel error occured. The application logs may have details.

An unhandled lowlevel error occured. The application logs may have details.

  • Rails 4.0から4.2へ移行した際のメモ

puma/pumaをサイト見たらここでエラーを出しているみたい。

=== puma startup: 2015-02-12 12:22:27 +0000 ===
=== puma startup: 2015-02-12 12:22:27 +0000 ===
[20244] - Worker 0 (pid: 20248) booted, phase: 0
@wellington1993
wellington1993 / squid_auth.rb
Created March 16, 2016 11:54 — forked from fredkelly/squid_auth.rb
Gmail authentication helper for use with Squid proxy.
#!/usr/bin/env ruby
require 'net/imap'
while true
# open connection
imap = Net::IMAP.new('imap.googlemail.com', 993, true)
# get credentials
user, pass = $stdin.readline.split
@wellington1993
wellington1993 / uninstall_gems.sh
Last active March 23, 2016 18:06 — forked from IanVaughan/uninstall_gems.sh
Uninstall all rbenv gems
#!/usr/bin/env zsh
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
#user nobody;
#Defines which Linux system user will own and run the Nginx server
worker_processes 1;
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores.
#error_log logs/error.log; #error_log logs/error.log notice;
#Specifies the file where server logs.
@wellington1993
wellington1993 / ssl.rules
Created March 30, 2016 16:25 — forked from konklone/ssl.rules
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@wellington1993
wellington1993 / nginx.conf
Created March 30, 2016 16:58 — forked from markjaquith/nginx.conf
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
@wellington1993
wellington1993 / nginx.conf
Created March 30, 2016 17:18 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@wellington1993
wellington1993 / nginx.conf
Created March 30, 2016 17:22 — forked from thoop/nginx.conf
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@wellington1993
wellington1993 / README.md
Created March 30, 2016 17:24 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@wellington1993
wellington1993 / .gemrc
Created April 5, 2016 11:26 — forked from jch/.gemrc
gemrc example
# http://docs.rubygems.org/read/chapter/11
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://gems.rubyforge.org/
- http://rubygems.org/
backtrace: true