Skip to content

Instantly share code, notes, and snippets.

View calvinchengx's full-sized avatar
:octocat:
Focusing

Calvin Cheng calvinchengx

:octocat:
Focusing
View GitHub Profile
// in build.gradle, declare
// apply from: 'integration-test.gradle'
sourceSets {
integrationTest {
java {
srcDirs = [ file('src/integration/java') ]
compileClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntime
runtimeClasspath += sourceSets.main.output + sourceSets.test.output + configurations.testRuntime
}
@calvinchengx
calvinchengx / .eslintrc
Created October 3, 2017 02:07
eslintrc
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
},
"settings": {
"ecmascript": 6,
"jsx": true
},
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 March 30, 2016 09:18
homebrew: upgrade PostgreSQL 9.4.5_2 to 9.5.0
#!/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
FROM scratch
ADD certs /etc/ssl/certs
ADD main /
CMD ["/main"]
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)
=============================
IPAddress ipAddress = IPAddress.Parse("xx.xx.xx.xx");
int port = 3003;
int bufferSize = 1024;
TcpClient client = new TcpClient();
NetworkStream netStream;
// Connect to server
try
{
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 August 29, 2015 14:23
hardware config for direct disk (SCSI) boot on Linode KVM
# 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 August 29, 2015 14:22
shell.nix for Yesod and ghc 7.84
{ 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