Skip to content

Instantly share code, notes, and snippets.

Emil Kilhage kilhage

Block or report user

Report or block kilhage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@vlasky
vlasky / debugeventemitter.js
Last active Jun 24, 2019
Debugging code to help track down events that cause EventEmitter memory leaks in Node.js
View debugeventemitter.js
//Is Node.js reporting warning messages like this?:
//
// "Warning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit"
//
//The following code will intercept calls to addListener() and on() and print the type of event and generate an Error exception
//With a stack trace to help you find the cause
var EventEmitter = require('events').EventEmitter;
const originalAddListener = EventEmitter.prototype.addListener;
@cmourizard
cmourizard / SugarElasticsearchConfgWithAsciifolding.php
Created Aug 13, 2015
Elasticsearch configuration to enable asciifolding
View SugarElasticsearchConfgWithAsciifolding.php
<?php
$sugar_config['full_text_engine']['Elastic']['index_settings']['default']['index'] = array(
'analysis' => array(
'analyzer' => array(
'core_email_lowercase' => array(
'type' => 'custom',
'tokenizer' => 'uax_url_email',
'filter' => array(
'lowercase',
@soheilhy
soheilhy / nginxproxy.md
Last active Nov 18, 2019
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@chicks
chicks / DB2_Install_Steps.sh
Last active Dec 8, 2018
Sugar and DB2 on CentOS 6.4
View DB2_Install_Steps.sh
# Disable SELinux
echo 0 > /selinux/enforce
perl -pi -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
# Install required packages
yum install pdksh compat-libstdc++-33 compat-libstdc++-33.i686 libaio libaio.i686 \
pam-1.1.1-17.el6.x86_64 pam-1.1.1-17.el6.i686 nfs-utils openssh-clients \
numactl
# Update Kernel Parameters (http://ibm.co/1czEKb4)
@joes
joes / git-pre-commit-php.rb
Created Aug 17, 2011
git pre-commit hook with php syntax checking and more
View git-pre-commit-php.rb
#!/usr/bin/env ruby
#
# Author: Joe Siponen <joe.siponen@gmail.com>
#
# A hook script to verify that only syntactically valid php code is commited.
#
# This hook also stops files containing the string '[[NOCOMMIT' from being committed.
# This provides an mechanism allowing you to protect yourself from committing
# code you have added for debugging purposes by adding the string '[[NOCOMMIT'
# near the relevant section of code.
@matthewmccullough
matthewmccullough / git-deletealltags.bsh
Created Apr 1, 2011
Script to delete all tags both locally and remotely
View git-deletealltags.bsh
for t in `git tag`
do
git push origin :$t
git tag -d $t
done
You can’t perform that action at this time.