Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Calvin Cheng calvinchengx

:octocat:
Focusing
Block or report user

Report or block calvinchengx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .eslintrc
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"settings": {
"ecmascript": 6,
"jsx": true
},
View openssl-1.0.2h
sudo cd /usr/local && mkdir src
sudo chown -R `whoami`:admin src
cd src
# Download and install
curl --remote-name https://www.openssl.org/source/openssl-1.0.2h.tar.gz
tar -xzvf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./configure darwin64-x86_64-cc --prefix=/usr/local/openssl-1.0.2h shared
make depend
@calvinchengx
calvinchengx / upgrade_postgresql.sh
Last active Mar 30, 2016
homebrew: upgrade PostgreSQL 9.4.5_2 to 9.5.0
View upgrade_postgresql.sh
#!/usr/bin/env bash
export OLDPG=9.4.5_2
export NEWPG=9.5.0
brew update && brew upgrade
brew install postgresql
# stop current server
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
View Dockerfile
FROM scratch
ADD certs /etc/ssl/certs
ADD main /
CMD ["/main"]
View 01.perl
2015-10-21 22:19:34 +0800
perl
Makefile.PL
INSTALL_BASE=/usr/local/Cellar/linode-cli/1.4.7/libexec
Welcome to JSON (v.2.90)
=============================
View gist:7b19d006b8dce5bcb997
IPAddress ipAddress = IPAddress.Parse("xx.xx.xx.xx");
int port = 3003;
int bufferSize = 1024;
TcpClient client = new TcpClient();
NetworkStream netStream;
// Connect to server
try
{
View gist:5870ce2ea574e7809dd2
CalvinMBP s004 Sat 4 Jul 9:33 | ~ |
calvin % traceroute gitlab.algoaccess.com
traceroute to gitlab.algoaccess.com (103.3.62.131), 64 hops max, 52 byte packets
1 192.168.1.1 (192.168.1.1) 2.686 ms 2.725 ms 6.624 ms
2 172.20.0.1 (172.20.0.1) 10.174 ms 14.087 ms 12.919 ms
3 40ge-103-6-148-45.myrepublic.com.sg (103.6.148.45) 12.223 ms 9.926 ms 13.172 ms
4 10gigabitethernet1-1.core1.sin1.he.net (202.79.197.81) 20.239 ms 4.098 ms 9.642 ms
5 74.82.46.190 (74.82.46.190) 40.570 ms 44.519 ms 43.983 ms
@calvinchengx
calvinchengx / hardware-configuration.nix
Last active Aug 29, 2015
hardware config for direct disk (SCSI) boot on Linode KVM
View hardware-configuration.nix
# Do not modify this file! It was generated by �~@~Xnixos-generate-config�~@~Y
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
@calvinchengx
calvinchengx / shell.nix
Last active Aug 29, 2015
shell.nix for Yesod and ghc 7.84
View shell.nix
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc784" }:
let
inherit (nixpkgs) pkgs;
f = { mkDerivation, aeson, base, bytestring, classy-prelude
, classy-prelude-conduit, classy-prelude-yesod, conduit, containers
, data-default, directory, fast-logger, file-embed, hjsmin, hspec
, http-conduit, monad-control, monad-logger, persistent
@calvinchengx
calvinchengx / objc.supp
Last active Sep 11, 2016
Valgrind suppression file for Valgrind r14960 on Mac OS X 10.10
View objc.supp
{
<insert_a_suppression_name_here>
Memcheck:Leak
match-leak-kinds: definite
fun:malloc_zone_malloc
fun:recursive_mutex_init
fun:lock_init
fun:_objc_init
fun:_os_object_init
fun:libdispatch_init
You can’t perform that action at this time.