Skip to content

Instantly share code, notes, and snippets.

# Ubuntu upstart file at /etc/init/mongodb.conf
pre-start script
mkdir -p /var/lib/mongodb/
mkdir -p /var/log/mongodb/
end script
start on runlevel [2345]
stop on runlevel [06]
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.6.deb
sudo dpkg -i scala-2.11.4.deb
sudo apt-get update
@russelyang
russelyang / Nested Paragraph Systems in CQ5
Created April 22, 2016 22:26 — forked from kand/Nested Paragraph Systems in CQ5
Sometimes nested paragraph systems are needed for special layout type components in CQ5. Here is a custom paragraph system that will overcome the issues related to nesting out of the box paragraph systems.
Set up your file structure for the innerParsys component:
innerParsys
-> parsys
-> new
- _cq_editConfig.xml
- .content.xml
- _cq_editConfig.xml
- .content.xml
- parsys.jsp

SSH agent forwarding and screen

When connecting to a remote server via SSH it is often convenient to use SSH agent forwarding so that you don't need a separate keypair on that server for connecting to further servers.

This is enabled by adding the

ForwardAgent yes

option to any of your Host entries in ~/.ssh/config (or alternatively with the -A option). Don't set this option in a wildcard Host * section since any user on the remote server that can bypass file permissions can now als use keys loaded in your SSH agent. So only use this with hosts you trust.

@russelyang
russelyang / README.md
Created August 10, 2017 16:44 — forked from pcj/README.md
Installing bazel 0.4.5 on Windows

Installing bazel 0.4.5 on Windows 10

  1. Read the steps in https://bazel.build/versions/master/docs/windows.html.
  2. Read the github issues bazelbuild/bazel#2431 and related bazelbuild/bazel#2449.
  3. May be useful to consult https://github.com/bazelbuild/bazel/blob/master/tools/cpp/cc_configure.bzl.

Install Msys2

  1. Make sure you install the Feb 5 2016 Msys2 version from https://sourceforge.net/projects/msys2/files/Base/x86_64/msys2-x86_64-20160205.exe/download.
  2. The install path must be c:\tools\msys64 (hardcoded into bazel).