Skip to content

Instantly share code, notes, and snippets.

View ralic's full-sized avatar
🏠
Working from home

Ralic Lo ralic

🏠
Working from home
View GitHub Profile
@jwgmeligmeyling
jwgmeligmeyling / DatabaseTestModule.java
Created May 18, 2016 22:19
Persisting recursive relationships with Hibernate
package org.hibernate.test;
import com.google.inject.AbstractModule;
import com.google.inject.Inject;
import com.google.inject.Singleton;
import com.google.inject.persist.PersistService;
import com.google.inject.persist.jpa.JpaPersistModule;
public class DatabaseTestModule extends AbstractModule {
@ralic
ralic / mesos-jenkins-marathon
Created May 14, 2016 06:32 — forked from diatmpravin/mesos-jenkins-marathon
mesos-jenkins-marathon json
{
"id": "jenkins",
"cmd": "cd jenkins-standalone-master && ./jenkins-standalone.sh -z $(cat /etc/mesos/zk) -r 127.0.0.1:6379",
"cpus": 0.5,
"mem": 256,
"disk": 1024,
"instances": 1,
"ports": [
0
],
@jasonphillips
jasonphillips / config.js
Last active June 24, 2018 13:10
Jupyter NodeJS: HTML Output (and React Demonstration)
module.exports = {
extensions: {
// clojurescript: require('./ext/clojurescript'),
clojure: require('./build/ext/clojure'),
clojurescript: require('./build/ext/clojurescript'),
coffee: require('./build/ext/coffee'),
babel: require('./build/ext/babel'),
html: require('./build/ext/html')
}
}
@piruin
piruin / nectec-apache-2.0
Created November 7, 2015 09:12
Intellij IDEA copyright profiles of NECTEC's Apache 2.0 License in Velocity templates
Copyright (c) $today.year NECTEC
National Electronics and Computer Technology Center, Thailand
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@hitsujiwool
hitsujiwool / docker.json
Created September 15, 2015 06:20
docker + docker-compose on Amazon Linux
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}"
},
"builders": [
{
"type": "amazon-ebs",
"ssh_pty": true,
"access_key": "{{user `aws_access_key`}}",
@ololobus
ololobus / Spark+ipython_on_MacOS.md
Last active September 26, 2024 08:50
Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Apache Spark installation + ipython/jupyter notebook integration guide for macOS

Tested with Apache Spark 2.1.0, Python 2.7.13 and Java 1.8.0_112

For older versions of Spark and ipython, please, see also previous version of text.

Install Java Development Kit

@bsorrentino
bsorrentino / j2objc.rb
Last active June 21, 2017 13:33
J2OBJC FORMULA (HOMEBREW)
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
# /usr/local/Library/Contributions/example-formula.rb
#
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
#
# FOR LOCAL INSTALLATION COPY IT IN /usr/local/Library/Formula/
#
class J2objc < Formula
homepage "http://j2objc.org/"
@barrysteyn
barrysteyn / svn-to-git.md
Last active October 10, 2024 12:27
Migrate From SVN To GIT
@madan712
madan712 / ReadWriteExcelFile.java
Created October 18, 2012 14:35
Read / Write Excel file (.xls or .xlsx) using Apache POI
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Iterator;
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;