Skip to content

Instantly share code, notes, and snippets.

View seeker815's full-sized avatar

Sai Kothapalle seeker815

  • self
  • Bangalore, India
View GitHub Profile
@seeker815
seeker815 / pmap.rb
Created March 17, 2016 09:05 — forked from sczizzo/pmap.rb
Simple, plain Ruby implementation of parallel map/each
#!/usr/bin/env ruby
require 'thread'
Thread.abort_on_exception = true
module Enumerable
def peach n=nil, &block
pmap n, &block
self
end
@seeker815
seeker815 / chef_dsl.rb
Created May 3, 2016 16:13 — forked from sczizzo/chef_dsl.rb
How one might implement Chef's Recipe DSL
# Basics
module Chef
class Resource
attr_reader :name
def initialize name
@name = name
end
repo = '%s-tools' % node['lsb']['codename']
apt_repository 'scalyr-agent-2' do
uri 'http://10.100.0.xx/repo/snapshots'
arch 'amd64'
distribution repo
components [repo]
key 'http://10.100.0.xx/repo/bjn.gpg'
end
package 'scalyr-agent-2' do
@seeker815
seeker815 / knife cheat
Created August 24, 2016 08:08 — forked from ipedrazas/knife cheat
Hello!
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
#!/bin/bash
# Ensure we're not running as root
if [ $EUID -eq 0 ] ; then
echo "Do not run as root!" 1>&2
exit 1
fi
#!/bin/bash
# Ensure we're not running as root
if [ $EUID -eq 0 ] ; then
echo "Do not run as root!" 1>&2
exit 1
fi
@seeker815
seeker815 / Kafka_cheatsheet.md
Created September 15, 2017 12:30
Kafka Cheatsheet

Kafka Cheatsheet

Kafka Operations

  • Run the commands on any of the kafka brokers (APIs in v0.10)

List all Kafka Topics

Command Cheatsheet

RAID

  • How do I know if an instance EBS volumes are RAID'd or not/ lvm or not?

lsblk

  • Get RAID details
@seeker815
seeker815 / scala_dep.md
Created December 4, 2017 09:22
Install Java,Scala and SBT

Install Java,Scala and SBT on Ubuntu 16.04

  • Install Java 8 (default jdk)

    sudo apt-get update

    sudo apt-get install default-jdk

    java -version

package checks
import (
"fmt"
"time"
"strings"
maps "github.com/ashwanthkumar/golang-utils/maps"
"github.com/gambol99/go-marathon"
)