Skip to content

Instantly share code, notes, and snippets.

@marcelbirkner
marcelbirkner / ciSeedJob.groovy
Last active October 21, 2022 13:55
Jenkins Job DSL Seed Job for Continuous Integration Jobs
import groovy.sql.Sql
import java.util.Date
import java.text.SimpleDateFormat
/*
* THIS IS AN EXAMPLE SNIPPET. FOR MORE DETAILS SEE THE FOLLOWING BLOG ARTICLE:
* https://blog.codecentric.de/en/?p=30502
*
* This Jenkins Job DSL Groovy Script creates Continuous Integration (CI) Jobs
* for all Maven & Ant projects that exist on a GitLab Server.
@SEJeff
SEJeff / gist:7310830
Last active January 16, 2020 09:07
Apache config to load balance across a cluster of elasticsearch instances on 2 different servers, "es-cluster-1", and "es-cluster-2".
<VirtualHost *:80>
ServerName balancer.local
Header add Set-Cookie "ROUTEID=.%{BALANCER_WORKER_ROUTE}e; path=/" env=BALANCER_ROUTE_CHANGED
<Location /balancer-manager>
ProxyPass !
SetHandler balancer-manager
#Require host example.com
Require host localhost
</Location>
@devgeeks
devgeeks / s3-phonegap-upload.js
Created November 27, 2012 19:47
S3 direct upload
var options = new FileUploadOptions();
options.fileKey="fileupload";
var time = new Date().getTime();
var userId = getUserId(); // In my case, Parse.User.current().id;
var fileName = userId+"-"+time+".jpg";
options.fileName = fileName;
options.mimeType ="image/jpeg";
options.chunkedMode = false;
var uri = encodeURI("https://BUCKET_NAME.s3.amazonaws.com/");
@mattb
mattb / gist:3888345
Created October 14, 2012 11:53
Some pointers for Natural Language Processing / Machine Learning

Here are the areas I've been researching, some things I've read and some open source packages...

Nearly all text processing starts by transforming text into vectors: http://en.wikipedia.org/wiki/Vector_space_model

Often it uses transforms such as TFIDF to normalise the data and control for outliers (words that are too frequent or too rare confuse the algorithms): http://en.wikipedia.org/wiki/Tf%E2%80%93idf

Collocations is a technique to detect when two or more words occur more commonly together than separately (e.g. "wishy-washy" in English) - I use this to group words into n-gram tokens because many NLP techniques consider each word as if it's independent of all the others in a document, ignoring order: http://matpalm.com/blog/2011/10/22/collocations_1/

@wataru420
wataru420 / addUser
Created February 7, 2012 03:54
Jenkins init script for centos
/usr/sbin/groupadd -g 30119 jenkins
/usr/sbin/useradd -u 30119 -g jenkins jenkins
mkdir /home/jenkins
chown -R jenkins. /home/jenkins
@carljm
carljm / postactivate
Created July 12, 2011 18:21
Yo dawg, I heard you like Ruby...
#!/bin/bash
# This hook is run after every virtualenv is activated.
export OLD_GEM_HOME=$GEM_HOME
export GEM_HOME=$VIRTUAL_ENV/gems/
export GEM_PATH=
export PATH=$VIRTUAL_ENV/gems/bin:$PATH
@huyng
huyng / matplotlibrc
Created February 8, 2011 15:50
my default matplotlib settings
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).