Skip to content

Instantly share code, notes, and snippets.

Steven Lu sjlu

Block or report user

Report or block sjlu

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
sjlu / metabase
Created Mar 15, 2018
metabase init.d
View metabase
# /etc/init.d/metabase
# Provides: Metabase
# Required-Start: $local_fs $network $named $time $syslog
# Required-Stop: $local_fs $network $named $time $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Metabase analytics and intelligence platform
sjlu / cloudflare-ddclient.patch
Created Aug 16, 2014
CloudFlare ddclient patch
View cloudflare-ddclient.patch
--- ddclient.orig 2013-09-26 01:06:12.399990673 +0100
+++ ddclient 2013-09-26 06:25:36.768189452 +0100
@@ -13,12 +13,17 @@
# Support for multiple IP numbers added by
# Astaro AG, Ingo Schwarze <ischwarze-OOs/> September 16, 2008
+# Modified to work with Cloudflare by Robert Ian Hawdon 2012-07-16:
+# Further modified to work with Cloudflare by Peter Roberts 2013-9-26, 2014-6-22:
View app.js
var Sequelize = require('sequelize');
var DataTypes = Sequelize;
sequelize = new Sequelize('mysql://root@localhost/29165644', {});
var Module = sequelize.define('module', {
id: DataTypes.INTEGER,
name: DataTypes.STRING,
description: DataTypes.STRING,
category_id: DataTypes.STRING,
sjlu / Contentful.js
Last active Jun 3, 2019
This helps compile Jekyll posts from Contentful
View Contentful.js
var Promise = require('bluebird')
var _ = require('lodash')
var fs = require('fs')
var contentful = require('contentful')
var client = contentful.createClient({
space: '0eybfmw2qkbf',
accessToken: process.env.CONTENTFUL_ACCESS_TOKEN,
host: process.env.CONTENTFUL_HOST
sjlu / Migrating from Amazon Linux to Amazon Linux 2 with Elastic Beanstalk and
Last active May 23, 2020
Migrating from Amazon Linux to Amazon Linux 2 with Elastic Beanstalk and Node.js
View Migrating from Amazon Linux to Amazon Linux 2 with Elastic Beanstalk and

This file is a log of everything I've encountered when trying to migrate a Node.js, Elastic Beanstalk application from the Amazon Linux platform to the Amazon Liunx 2 platform. Here's why you should migrate:

  1. LTS support up to 2023 source
  2. The Amazon Linux AMI's end-of-life is December, 2020 source
  3. Amazon Linux 2 has some big package upgrades (GCC, Glibc, etc.)
  4. Elastic Beanstalk also has some upgrades on top of Amazon Linux 2 (e.g. faster deploys)


Disabling NPM install

You can’t perform that action at this time.