Skip to content

Instantly share code, notes, and snippets.

@MonicaG
MonicaG / oracleJDBCSetup
Last active September 29, 2016 15:03
Using Oracle with Spring Boot
If you do not have an oracle driver do steps 1 and 2 first. Otherwise skip to step 3.
1) Download the jdbc driver from oracle.
2) Install the driver into your local maven .m2 repository. Example:
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true
In the above example the ojdbc6.jar version 11.2.0.4 is used. Replace the -DartifactId=ojdbc6 -Dversion=11.2.0.4 and -Dfile=ojdbc6.jar with the driver name/version you downloaded.
@MonicaG
MonicaG / PostgresqlInstallation
Last active August 29, 2015 14:11
PostgreSQL installation notes
I setup PostgreSQL on Centos 7 using Virtual Box.
Some notes on installing/running postgresql
- Good overall instructions on seting up PostgreSQL:
http://www.postgresonline.com/journal/archives/329-An-almost-idiots-guide-to-install-PostgreSQL-9.3,-PostGIS-2.1-and-pgRouting-with-Yum.html
Some additional changes/steps I did to get things working on Virtual Box. (Guest was Centos7 and Host Mac OSX)
- added following to /var/lib/pgsql/9.3/data/pg_hba.conf
@MonicaG
MonicaG / syntax.css
Created November 29, 2015 22:23
Stylesheet for formatting code snippets when using Bootstrap and Jekyll version 3
/*hightling from https://github.com/mojombo/tpw/blob/master/css/syntax.css*/
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
@MonicaG
MonicaG / XCodeShortcuts.markdown
Last active April 14, 2020 15:27
Some XCode shortcuts

Documentation description

  • Put the cursor on the same line as the function or property
  • cmd + option + /

This will create a documentation block like the following:

/// <#Description#>
/// - Parameter param1: <#param1 description#>
/// - Returns: &lt;#description#&gt;
@MonicaG
MonicaG / KnapsackAlgorithm.js
Last active May 5, 2022 17:51
Knapsack Algorithm
#!/usr/bin/env node
class Item {
constructor(name, value, weight) {
this.name = name;
this.value = value;
this.weight = weight;
}
toString() {
return `Item name: ${this.name} value: ${this.value} weight: ${this.weight}`;
}