Skip to content

Instantly share code, notes, and snippets.

View pchaganti's full-sized avatar

Prabhakar Chaganti pchaganti

View GitHub Profile
@bokmann
bokmann / JRuby Awesome Performance
Last active August 31, 2023 07:32
brief summary of massive performance improvements with JRuby
# Thee will be more information here when I share the entire problem space I'm working on, but
# in short, this is preview material for my second talk in a series called "What Computer Scientists Know".
# The first talk is on recursion, and goes through several examples., leading up to a problem based
# on a simple puzzle that initial estimates based on performance of a previous puzzle would take years
# to solve on modern computers with the techniques shown in Ruby. That sets the stage for improving the
# performance of that problem with threading, concurrency, and related tuning.
#
# The second talk is on threading and concurrency, touching on algorithmic performance as well.
# Using some knowledge of the problem (board symmetry, illegal moves, etc), we reduce the problem space
# to about .5% of what we initially thought it was. Still, the initial single threaded solution took more
@joemiller
joemiller / raid_ephemeral.sh
Last active October 23, 2023 21:53
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"
@okochang
okochang / introduction_redshift_vpc.rb
Created February 17, 2013 10:57
VPC上にRedshiftを起動して削除するまでの手順
# -*- coding: utf-8 -*-
require 'aws-sdk'
ACCESS_KEY = "set your access key id"
SECRET_KEY = "set your secret key"
REGION = 'redshift.us-east-1.amazonaws.com'
EC2_REGION = 'ec2.us-east-1.amazonaws.com'
## Redshift用のインターフェースを作成します
rs = AWS::Redshift.new(