Skip to content

Instantly share code, notes, and snippets.

@Dylan0203
Dylan0203 / History|-108b5779|entries.json
Last active May 12, 2022 10:07
Visual Studio Code Sync Settings Gist
{"version":1,"resource":"file:///Users/dylan/Projects/skid/app/javascript/src/admin/js/components/promotion/form.vue","entries":[{"id":"Y6yf.vue","timestamp":1651919260459}]}
@Dylan0203
Dylan0203 / errbit-integration.md
Last active April 13, 2017 10:14
Errbit integration

At errbit server

  • Add a New App and fill up
  • after submit, it'll tell you to add a 'errbit.rb' file to config/initializers folder
errbit.rb
# Require the airbrake gem in your App.
# ---------------------------------------------
#
@Dylan0203
Dylan0203 / what-i-did.md
Created April 19, 2017 08:24
Error Terminal-notifier in Guard

gem uninstall terminal-notifier

brew uninstall terminal-notifier

brew install terminal-notifier

@Dylan0203
Dylan0203 / what-i-did.md
Created April 19, 2017 08:26
Error Double initialize Json while Guard
16:06:51 - INFO - LiveReload is waiting for a browser to connect.
16:06:51 - INFO - Guard::RSpec is running
16:06:51 - INFO - Guard is now watching at '/Users/dylan/Projects/TargetGlobal'
[1] guard(main)>
16:06:57 - INFO - Run all
16:06:57 - INFO - Running all specs
/Users/dylan/.rbenv/versions/2.3.3/lib/ruby/2.3.0/json/version.rb:4: warning: already initialized constant JSON::VERSION
/Users/dylan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/json-2.0.2/lib/json/version.rb:4: warning: previous definition of VERSION was here
/Users/dylan/.rbenv/versions/2.3.3/lib/ruby/2.3.0/json/version.rb:5: warning: already initialized constant JSON::VERSION_ARRAY
@Dylan0203
Dylan0203 / text.txt
Created April 19, 2017 11:35
VS code crash report
Process: Electron [42482]
Path: /Applications/Visual Studio Code.app/Contents/MacOS/Electron
Identifier: com.microsoft.VSCode
Version: 1.11.2 (1.11.2)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Electron [42482]
User ID: 501
Date/Time: 2017-04-19 19:34:20.179 +0800
@Dylan0203
Dylan0203 / library_not_found_for_lssl.md
Last active April 20, 2017 07:41
gem install mysql2

while fixing termainal-notifier, I excute gem clean --force and now need to bundle on every project

Then I ran into a problem while install mysql2

 ~/Projects  gem install mysql2
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
	ERROR: Failed to build gem native extension.

found solution on the link below

SlatherOrg/slather#227

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/dylan/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/nokogiri-1.6.8.1/ext/nokogiri
/Users/dylan/.rbenv/versions/2.3.3/bin/ruby -r ./siteconf20170419-54813-jzpam3.rb extconf.rb --use-system-libraries
checking if the C compiler accepts ... yes
@Dylan0203
Dylan0203 / fuckup.md
Last active May 18, 2017 08:46
亂搞 local ssl

要用rails 5 的 puma 跑ssl 首先會碰到一個問題

新版的 mac os 好像用了openssl然後之前用homebrew裝的openssl就不能用了,

keg-only 就是不幫你連起來,你也不要連,會壞掉

裝了之後在termal打的指令都是用系統內建版本在執行

但是你可以用brew的版本compile一些需要build local的gem

@Dylan0203
Dylan0203 / readme.md
Last active June 1, 2017 12:46
升級openssl ubuntu 14.04
@Dylan0203
Dylan0203 / text.md
Created June 28, 2017 06:50
Bundle or compile problems
gem install eventmachine -v '1.0.8' -- --with-cppflags=-I/usr/local/opt/openssl/include