Skip to content

Instantly share code, notes, and snippets.

View sigerello's full-sized avatar

Oleksandr Serhiienko sigerello

View GitHub Profile
# ========================================
# Testing n-gram analysis in ElasticSearch
# ========================================
curl -X DELETE localhost:9200/ngram_test
curl -X PUT localhost:9200/ngram_test -d '
{
"settings" : {
"index" : {
"analysis" : {

Zero downtime deploys with unicorn + nginx + runit + rvm + chef

Below are the actual files we use in one of our latest production applications at Agora Games to achieve zero downtime deploys with unicorn. You've probably already read the GitHub blog post on Unicorn and would like to try zero downtime deploys for your application. I hope these files and notes help. I am happy to update these files or these notes if there are comments/questions. YMMV (of course).

Other application notes:

  • Our application uses MongoDB, so we don't have database migrations to worry about as with MySQL or postgresql. That does not mean that we won't have to worry about issues with the database with indexes being built in MongoDB or what have you.
  • We use capistrano for deployment.

Salient points for each file:

Process: MDB Explorer [36533]
Path: /Applications/MDB Explorer.app/Contents/MacOS/MDB Explorer
Identifier: com.grandsoft.MDB-Explorer
Version: 2.4.3 (2.4.300)
App Item ID: 506622388
App External ID: 812130215
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: MDB Explorer [36533]
User ID: 501
Process: MDB Explorer [18501]
Path: /Applications/MDB Explorer.app/Contents/MacOS/MDB Explorer
Identifier: com.grandsoft.MDB-Explorer
Version: 2.4.5 (2.4.500)
App Item ID: 506622388
App External ID: 813023495
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: MDB Explorer [18501]
User ID: 501
@sigerello
sigerello / Ux.InputTextMask.js
Last active September 20, 2015 12:10 — forked from loiane/Ux.InputTextMask.js
Ux.InputTextMask for ExtJS4
/**
* InputTextMask script used for mask/regexp operations.
* Mask Individual Character Usage:
* 9 - designates only numeric values
* L - designates only uppercase letter values
* l - designates only lowercase letter values
* A - designates only alphanumeric values
* X - denotes that a custom client script regular expression is specified</li>
* All other characters are assumed to be "special" characters used to mask the input component.
* Example 1:
@sigerello
sigerello / 1.js
Last active May 4, 2017 18:06
easysoap GA code
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-38768986-1', 'auto');
ga('send', 'pageview');
</script>
@sigerello
sigerello / fuse.js
Created May 28, 2018 20:23 — forked from Pavel1104/fuse.js
fusebox settings
const { FuseBox, WebIndexPlugin, StylusPlugin, CSSPlugin, EnvPlugin, QuantumPlugin } = require("fuse-box");
const isProduction = process.env.NODE_ENV === "production"
let fuse = FuseBox.init({
homeDir : "src",
target : 'browser@es5',
output : "dist/$name.js",
plugins : [
[StylusPlugin(), CSSPlugin()],