Independent IT consultant pursuing freedom

0%

Records for rails errors and solutions.

Error: Deploy processing fail and expose error below, but no detail log for where the error occur.

Error message: Uglifier::Error: Unexpected token: punc (,)

Solution: Go into ‘rails console’ mode, and run script below. Code position where error occur will show up.

JS_PATH = "app/assets/javascripts/**/*.js"; 
Dir[JS_PATH].each do |file_name|
  puts "\n#{file_name}"
  puts Uglifier.compile(File.read(file_name), harmony: true)
end

Read more »

Shadowsocks Proxy

Server-side setup

1
2
3
4
apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start

Client-side setup

  • Install Shadowsocks Client, e.g. run brew cask install shadowsocksx in macOS.
  • SwitchSharp

Only config SOCKS Host to 127.0.0.1:1080 and select SOCKS v5

Read more »

Most simple elk stack solution for independent developer

I’m a IT consultant and independent developer. There are so many different projects I have developed for such a long time and most of these projects don’t have lot traffic. So I think this solution is the most simple.

TLDR: All project got a filebeat container to watch log files and send to a SINGLE ELK sever(Elasticsearch/Logstash/Kibana all in one).

Read more »