This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo modprobe hid_magicmouse scroll-speed=1 scroll-acceleration=4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First verify the version of Java being used is not SunJSK. | |
java -version | |
# Get the latest Sun Java SDK from Oracle http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u1-download-513651.html | |
wget http://download.oracle.com/otn-pub/java/jdk/7u1-b08/jdk-7u1-linux-i586.rpm | |
# Rename the file downloaded, just to be nice | |
mv jdk-7u1-linux-i586.rpm\?e\=1320265424\&h\=916f87354faed15fe652d9f76d64c844 jdk-7u1-linux-i586.rpm | |
# Install Java |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://db.tt/OvdCg4Fe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MERGE INTO target_name T USING | |
( select 1 from dual) S ON | |
( clause_that_finds_record inside T ) | |
WHEN MATCHED THEN UPDATE | |
SET update_what_you_want_in_T | |
WHEN NOT MATCHED THEN | |
INSERT( | |
stuff_in_t | |
) VALUES( ...values... ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch origin | |
git checkout master | |
git merge origin/master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.swsandbox.resource; | |
import com.swsandbox.service.UserService; | |
import javax.inject.Inject; | |
import javax.servlet.*; | |
import javax.servlet.annotation.WebFilter; | |
import java.io.IOException; | |
@WebFilter(urlPatterns = "/*") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When you see this: | |
at java.lang.Thread.run(Thread.java:724) | |
Caused by: java.lang.UnsatisfiedLinkError: no snappyjava in java.library.path | |
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1878) | |
at java.lang.Runtime.loadLibrary0(Runtime.java:849) | |
at java.lang.System.loadLibrary(System.java:1087) | |
at org.xerial.snappy.SnappyNativeLoader.loadLibrary(SnappyNativeLoader.java:52) | |
... 114 more]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.swsandbox.hack; | |
import com.google.common.collect.ImmutableSet; | |
import com.google.common.util.concurrent.Service; | |
import javax.enterprise.context.ApplicationScoped; | |
import javax.enterprise.inject.Produces; | |
/** | |
* This is included to bypass the Java EE 7 issue with Google Guava and CDI: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> | |
<persistence-unit name="db" transaction-type="JTA"> | |
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> | |
<jta-data-source>jdbc/DbPool</jta-data-source> | |
<exclude-unlisted-classes>false</exclude-unlisted-classes> | |
</persistence-unit> | |
</persistence> |
NewerOlder