Skip to content

Instantly share code, notes, and snippets.

View rsrini7's full-sized avatar
๐Ÿ˜ƒ
Happy

Srinivasan Ragothaman rsrini7

๐Ÿ˜ƒ
Happy
View GitHub Profile
@rsrini7
rsrini7 / pkg-config-opencv
Created May 14, 2015 18:54
pkg-config opencv
pkg-config opencv --cflags
pkg-config opencv --libs
pkg-config opencv --modversion
#!/usr/bin/ruby
=begin
Usage: rtftomarkdown.rb FILENAME.rtf
Uses textutil, available on Mac only (installed by default)
Outputs to STDOUT
Notes:
Links are replaced with Markdown references (duplicate links combined).
https://github.com/oracle/db-sample-schemas
download the zip file and extract to "D:\app\rsrini7\product\12.1.0\dbhome_1\demo\schema"
here rsrini7 is my username. extract the zip file to the dir according to your installation.
open command prompt as administrator
d: enter
cd D:\app\rsrini7\product\12.1.0\dbhome_1\demo\schema
@rsrini7
rsrini7 / 0_reuse_code.js
Last active August 29, 2015 14:23
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
@rsrini7
rsrini7 / ruby-devkit-gem-windows
Last active August 29, 2015 14:23
Install Ruby and DevKit for Windows to install GEMs with DevKit dependency
Download Ruby installer and install / 7zip file and extract from http://rubyinstaller.org/downloads/
set the ruby bin directory available in the PATH variable.
Based on 32 / 64 bit arch, download DevKit from http://rubyinstaller.org/downloads/
Extract DevKit as RubyDevKit into your ruby installed directory (you can extract anywhere)
CD RubyDevKit
ruby dk.rb init
ruby dk.rb install
@rsrini7
rsrini7 / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:26 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
java.naming.factory.initial = com.sun.enterprise.naming.SerialInitContextFactory
java.naming.factory.url.pkgs = com.sun.enterprise.naming
java.naming.factory.state = com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl
#optional. Defaults to localhost. Only needed if web server is running
#on a different host than the appserver
org.omg.CORBA.ORBInitialHost = localhost
#optional. Defaults to 3700. Only needed if target orb port is not 3700.
org.omg.CORBA.ORBInitialPort = 3700
### JBossNS properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
properties.put(Context.PROVIDER_URL,"remote://127.0.0.1:4447");
// username
properties.put(Context.SECURITY_PRINCIPAL, "user");
// password
properties.put(Context.SECURITY_CREDENTIALS, "password");
// This is an important property to set if you want to do EJB invocations via the remote-naming project
properties.put("jboss.naming.client.ejb.context", true);
// create a context passing these properties
@rsrini7
rsrini7 / WordCounter.scala
Created November 8, 2015 03:44 — forked from Diego81/WordCounter.scala
Simple Word Counter implemented using Akka
import akka.actor.{ Actor, ActorRef, Props, ActorSystem }
case class ProcessStringMsg(string: String)
case class StringProcessedMsg(words: Integer)
class StringCounterActor extends Actor {
def receive = {
case ProcessStringMsg(string) => {
val wordsInLine = string.split(" ").length
sender ! StringProcessedMsg(wordsInLine)