Skip to content

Instantly share code, notes, and snippets.

View budhash's full-sized avatar

Budhaditya budhash

  • San Francisco Bay Area
View GitHub Profile
@budhash
budhash / org.eclipse.jetty.plist
Created October 23, 2012 05:20 — forked from mystix/org.eclipse.jetty.plist
Jetty 6 & 7 launchd plists for OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><!-- NOTE: place this file in /Library/LaunchDaemons -->
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.eclipse.jetty</string>
<key>ServiceDescription</key>
<string>Jetty 7</string>
# Apt-install various things necessary for Ruby, guest additions,
# etc., and remove optional things to trim down the machine.
apt-get -y update
apt-get -y remove apparmor
apt-get -y install linux-headers-$(uname -r) build-essential
apt-get -y install zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev libssl-dev openssl libreadline5-dev
apt-get clean
# Remove this file to avoid dhclient issues with networking
rm -f /etc/udev/rules.d/70-persistent-net.rules
# **postinstall.sh** is a script executed after Debian/Ubuntu has been
# installed and restarted. There is no user interaction so all commands must
# be able to run in a non-interactive mode.
#
# If any package install time questions need to be set, you can use
# `preeseed.cfg` to populate the settings.
### Setup Variables
# The version of Ruby to be installed supporting the Chef and Puppet gems
@budhash
budhash / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@budhash
budhash / openssl-maker.sh
Last active September 10, 2015 19:15 — forked from letiemble/openssl-maker.sh
A bash script to generate "all-in-one" OpenSSL static libraries for OS X and iOS. The script produces fat static libraries (i386,x86_64 for OS X) and (i386,armv7,armv7s,arm64 for iOS) suitable for integration in both OS X and iOS project.
#!/bin/bash
###############################################################################
## ##
## Build and package OpenSSL static libraries for OSX/iOS ##
## ##
## This script is in the public domain. ##
## Creator : Laurent Etiemble ##
## ##
###############################################################################
@budhash
budhash / Redis-Ruby_Inverted-Index-Search-(Antirez)
Created September 30, 2015 03:10 — forked from kernelp4nic/ Redis-Ruby_Inverted-Index-Search-(Antirez)
Build an inverted index for a full-text search engine with Redis.
--
@budhash
budhash / Non-Blocking Guava Cache
Last active March 21, 2016 09:49 — forked from theotherian/ Non-Blocking Guava Cache
Blocking on cache reads beyond the first is just plain rude in my opinion, so refresh in the background.
http://www.theotherian.com/2013/11/non-blocking-cache-with-guava-and-listenable-futures.html
#!/bin/bash
set -e
UPDATES_URL="http://updates.jenkins-ci.org/download/plugins/"
if [ $# -lt 2 ]; then
echo "USAGE: $0 plugin-list-file destination-directory"
exit 1
fi
@budhash
budhash / List 2 Pairs
Created September 23, 2016 03:45 — forked from ktejnora/List 2 Pairs
Java 8 Create list of pairs from List of items. Java does not have Pair and groupBy uses AtomicInteger trick.
package cz.tejnora.pokusy;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.MatcherAssert.assertThat;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;