This file contains 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 | |
# Add repositories | |
sudo add-apt-repository -y "deb http://repository.spotify.com stable non-free" | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo add-apt-repository -y ppa:fish-shell/nightly-master | |
echo "deb http://downloads.hipchat.com/linux/apt stable main" | sudo tee \ | |
/etc/apt/sources.list.d/atlassian-hipchat.list | |
sudo add-apt-repository -y ppa:linrunner/tlp | |
sudo apt-add-repository -y ppa:pipelight/stable |
This file contains 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
for f in `find /the/dir -user THE_USER -maxdepth 1`; do chmod -R g+w "$f"; done |
This file contains 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 cvsimport -p -x -v -k -o cvsheadbranch -s _ -duser.name@127.0.0.1:/dir/cvsroot -C newGitDir 'CVS MODULE NAME' |
This file contains 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
#like svn:externals, only you can update the code!!!! | |
#install (*nix) - easy! See http://piston.rubyforge.org/ | |
#Assuming BASH | |
[sudo] gem install piston | |
#Usage - import remote subtree/directory to required project destination | |
piston import -v0 [--repository-type git|svn] <url/of/git/or/svn/repository> <destination/directory> |
This file contains 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
mvn archetype:generate -DarchetypeCatalog=http://kallisti.eoti.org:8081/content/repositories/snapshots/archetype-catalog.xml | |
See http://malsandroid.blogspot.com/2010/04/galatea-mavenandroid-archetype.html |
This file contains 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
log4j.rootLogger=INFO, logfile | |
log4j.logger.org.springframework.web.context=DEBUG, stdout | |
# in case any output is given to stdout, format it | |
log4j.appender.stdout=org.apache.log4j.ConsoleAppender | |
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout | |
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n | |
log4j.appender.logfile=org.apache.log4j.RollingFileAppender | |
log4j.appender.logfile.File=myproject.log |
This file contains 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
for myFileSetVar in `find /some/path -iname '*some.file*'`; do newAwkVar=`echo $myFileSetVar | awk -F/ '{print $1}'`; echo $newAwkVar came from $myFileSetVar; done |
This file contains 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
<!-- Lazy load (at request time) a Spring bean --> | |
<bean id="someBeanLazy" class="org.springframework.aop.framework.ProxyFactoryBean"> | |
<property name="targetSource"> | |
<bean class="org.springframework.aop.target.LazyInitTargetSource"> | |
<property name="targetBeanName" value="someRealBean" /> | |
<property name="targetClass"> | |
<bean class="java.lang.Class" factory-method="forName"> | |
<constructor-arg value="com.package.TheClassToMakeLazy"/> | |
</bean> | |
</property> |
This file contains 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
//'using' System.Data.SQLite | |
public void SQLiteTest() | |
{ | |
string cnString = @"Data Source=C:\Working\whodatashapefiles\whodata.db3"; | |
using (SQLiteConnection conn = new SQLiteConnection(cnString)) | |
{ | |
conn.Open(); | |
using (SQLiteCommand cmd = conn.CreateCommand()) | |
{ |
This file contains 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
using (DbConnection connection = new SQLiteConnection("Data Source=" + database)) { | |
connection.Open(); // load the extension | |
using (DbCommand command = connection.CreateCommand()) { | |
//Load the libspatialite library extension - *.dll on windows, *.a on iOS | |
command.CommandText = "SELECT load_extension('libspatialite-2.dll');"; | |
command.ExecuteNonQuery(); // Run queries here | |
} | |
} |
OlderNewer