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
~/.bash_profile | |
alias ll='ls -aFhlG' | |
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH" | |
PATH="/usr/local/mysql/bin:$PATH" | |
alias psql='psql -d postgres' | |
#PS1="\[\033[G\]$PS1" | |
### Added by the Heroku Toolbelt |
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
#!/bin/bash | |
# NOTE: this is an OSX launchd wrapper shell script for Tomcat (to be placed in $CATALINA_HOME/bin) | |
CATALINA_HOME=/Users/username/tomcat | |
function shutdown() { | |
date | |
echo "Shutting down Tomcat" | |
$CATALINA_HOME/bin/catalina.sh stop |
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
defaults write com.apple.dashboard mcx-disabled -boolean YES | |
defaults write NSGlobalDomain AppleShowScrollBars -string "Always" | |
defaults write NSGlobalDomain AppleShowAllExtensions -bool true | |
defaults write com.apple.finder QLEnableTextSelection -bool true | |
killall Dock | |
#To fix Apache Benchmark (ab): | |
brew install pcre |
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> |
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
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.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
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
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
http://db.tt/OvdCg4Fe |
OlderNewer