Skip to content

Instantly share code, notes, and snippets.

@ctgswallow
ctgswallow / es_backup.sh
Last active November 14, 2022 05:33
Elasticsearch backup script
#!/bin/bash
################################################################
##### script to backup lucene index from elastic search ####
################################################################
# Shamelessly copied from https://gist.github.com/nherment/1939828
NOW=`date +%Y%m%d%H%M%S`

Installation

FreeBSD

portmaster irc/irssi
portmaster irc/irssi-xmpp

OS X

brew install irssi

@benders
benders / git-setup.sh
Last active July 27, 2016 09:51
New Employee git setup
FULLNAME=`finger "$USER" | awk -F: '{ print $3 }' | head -n1 | sed 's/^ //'`
# Git needs to know who you are!
git config --global user.name "${FULLNAME}"
git config --global user.email "${USER}@newrelic.com"
# SVN style shortcuts
git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
@wiredmax
wiredmax / haproxy.cfg
Last active July 15, 2022 23:08 — forked from sidupadhyay/sample.config
Sample HA-Proxy configuration for load balancing SockJS running on Node.JS servers.
global
maxconn 10000 # Total Max Connections. This is dependent on ulimit
nbproc 2
defaults
mode http
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
@OrangeTux
OrangeTux / config
Last active June 19, 2021 13:18
Config for Irssi to connect to various XMPP chat servers. Replace the passwords, usernames an ids by your own. Remember, the irssi-xmpp (http://cybione.org/~irssi-xmpp/) plugin is requried.
# irssi-xmpp plugin required
# http://cybione.org/~irssi-xmpp/
servers = (
{
address = "chat.facebook.com";
chatnet = "facebook";
password = "<password>";
autoconnect = "true";
},
{
@torbenbr
torbenbr / es.sh
Last active December 18, 2015 13:49
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb
sudo dpkg -i elasticsearch-1.5.2.deb
sudo service elasticsearch start
@aaronpk
aaronpk / gist:5846789
Last active August 14, 2025 13:26
Added WebFinger support to my email address using one rewrite rule and one static file.
[[email protected] www]$ cat .htaccess
RewriteEngine on
RewriteCond %{QUERY_STRING} resource=acct:(.+)
RewriteRule ^\.well-known/webfinger /profile/%1? [L]
[[email protected] www]$ cat profile/[email protected]
{
"subject": "acct:[email protected]",
"links": [
{
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.Mapper;
public class SolrMapper extends Mapper<LongWritable, Text, Text, Text> {
private HttpSolrServer solrServer;
private Text outKey = new Text();
@Override
@harunyardimci
harunyardimci / ldap-query.sh
Created July 8, 2013 19:23
Prints LDAP groups of given user. Ex: $ ldap-query.sh hyardimci admin developer architect
#!/bin/sh
#
# Copyright (c) 2010 Nokia Corporation
#
# This code is licensed to you under MIT-style license. License text for that
# MIT-style license is as follows:
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights