Skip to content

Instantly share code, notes, and snippets.

View namakukingkong's full-sized avatar

namakukingkong namakukingkong

View GitHub Profile
require 'sidekiq/api'
# 1. Clear retry set
Sidekiq::RetrySet.new.clear
# 2. Clear scheduled jobs
Sidekiq::ScheduledSet.new.clear
-Xms1024m
-Xmx3072m
-Xss64m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
-XX:NewRatio=2
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=250
-XX:NewSize=512m
@namakukingkong
namakukingkong / xcode_command_line_tools.txt
Created January 2, 2020 11:09
Xcode Command Line Tools install
# Installation notes for macOS Catalina (v10.15)
Lessons learned from:
* https://github.com/nodejs/node-gyp/issues/1779
* https://github.com/nodejs/node-gyp/issues/1861
* https://github.com/nodejs/node-gyp/issues/1927 and elsewhere
Installing `node-gyp` on macOS can be found at https://github.com/nodejs/node-gyp#on-macos
However, upgrading to macOS Catalina changes some settings that may cause normal `node-gyp` installations to fail.
# Nginx+Unicorn best-practices congifuration guide. Heartbleed fixed.
# We use latest stable nginx with fresh **openssl**, **zlib** and **pcre** dependencies.
# Some extra handy modules to use: --with-http_stub_status_module --with-http_gzip_static_module
#
# Deployment structure
#
# SERVER:
# /etc/init.d/nginx (1. nginx)
# /home/app/public_html/app_production/current (Capistrano directory)
#

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

require 'Twitter' #gem install twitter
while true
begin
# Create a read write application from :
# https://apps.twitter.com
# authenticate it for your account
# fill in the following
config = {
consumer_key: '',
consumer_secret: '',
package
{
/**
* ActionScript 3.0 Code Snippet
* Convert Number to Rupiah & vice versa
* https://gist.github.com/845309
*
* Copyright 2011-2012, Faisalman
* Licensed under The MIT License
* http://www.opensource.org/licenses/mit-license