Skip to content

Instantly share code, notes, and snippets.

View michael-ji0406's full-sized avatar

Michael Ji(及子龙) michael-ji0406

View GitHub Profile
@mbejda
mbejda / openssl.ssh
Created April 12, 2016 12:37
Installing OpenSSL 1.0.2 on Ubuntu 14
openssl version -a
sudo add-apt-repository ppa:0k53d-karl-f830m/openssl
sudo apt-get update
sudo apt-get install openssl
openssl version -a
@prokizzle
prokizzle / default.conf
Last active March 28, 2023 02:10
Working Nginx Config for Faye over SSL
upstream faye_server {
server 127.0.0.1:9292;
}
server {
# listen 80;
listen 443 ssl;
server_name your-faye-server.com;
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active July 24, 2025 16:11
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@trushkevich
trushkevich / deploy.rb
Last active June 9, 2016 15:08
Capistrano 3 private_pub tasks
set :private_pub_pid, -> { "#{current_path}/tmp/pids/private_pub.pid" }
namespace :private_pub do
desc "Start private_pub server"
task :start do
on roles(:app) do
within release_path do
with rails_env: fetch(:stage) do
execute :bundle, "exec thin -C config/private_pub/thin_#{fetch(:stage)}.yml -d -P #{fetch(:private_pub_pid)} start"
end
@jtadeulopes
jtadeulopes / server.md
Last active October 22, 2025 18:39
Server setup with ubuntu, nginx and puma for rails app.

Update and upgrade the system

sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade && sudo apt-get autoremove
sudo reboot

Configure timezone