Skip to content

Instantly share code, notes, and snippets.

View cyanglee's full-sized avatar

Kenneth Lee cyanglee

View GitHub Profile
@cyanglee
cyanglee / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cyanglee
cyanglee / 寶寶.js
Created April 29, 2016 10:34 — forked from DingWeizhe/寶寶.js
新增line的功能
var fs = require('fs'),
http = require('http'),
https = require('https'),
express = require('express'),
bodyParser = require('body-parser'),
request = require('request'),
crypto = require('crypto'),
FBToken = '',
port = 443,
options = {
> bill = { name = "Gates", age = 57 }
{ name = "Gates", age = 57 } : { age : number, name : String }
> { bill | test = "123" }
-- TYPE MISMATCH --------------------------------------------- repl-temp-000.elm
`bill` is being used in an unexpected way.
4| { bill | test = "123" }
^^^^
Based on its definition, `bill` has this type:
@cyanglee
cyanglee / .rubocop.yml
Created May 11, 2019 10:27
Rubocup settings
AllCops:
TargetRubyVersion: 2.5
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
# to ignore them, so only the ones explicitly set in this file are enabled.
DisabledByDefault: true
Exclude:
- '**/templates/**/*'
- '**/vendor/**/*'
- 'actionpack/lib/action_dispatch/journey/parser.rb'
- 'railties/test/fixtures/tmp/**/*'
@cyanglee
cyanglee / issue.md
Created January 6, 2020 03:18
Rails with Postgres 12 issue
  • Ran into an weird pg related issue:
.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56: [BUG] Segmentation fault at 0x0000000000000110
— Control frame information ———————————————————————
c:0071 p:—— s:0406 e:000405 CFUNC  :initialize
c:0070 p:—— s:0403 e:000402 CFUNC  :new
c:0069 p:0016 s:0398 e:000397 METHOD /Users/xxx/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/pg-1.1.4/lib/pg.rb:56
c:0068 p:0107 s:0393 e:000392 METHOD /Users/xxx/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.1/lib/active_record/connection_adapters/postgres