Skip to content

Instantly share code, notes, and snippets.

View bsurnida's full-sized avatar

Bhasker Surnida bsurnida

  • Oracle Corporation
  • Redwood Shored, San Francisco, CA.
View GitHub Profile
@btroncone
btroncone / rxjs_operators_by_example.md
Last active March 30, 2025 21:26
RxJS 5 Operators By Example
@NTag
NTag / beautifulUbuntu.md
Last active November 17, 2018 13:51
Beautiful Terminal with Ubuntu 14.04 LTS
  1. Install ZSH
    • sudo apt-get install git zsh
  2. Install OhMyZSH
    • sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  3. Install zsh-autosuggestions
    • git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
    • Edit ~/.zshrc and replace line plugins=(git) with plugins=(git zsh-autosuggestions)
    • Create a file ~/.oh-my-zsh/custom/colors.zsh containing ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=240'
  4. Install zsh-syntax-highlighting
  • git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
@syedrakib
syedrakib / RSA_example.py
Last active June 21, 2024 19:48
An example of asymmetric encryption in python using a public/private keypair - utilizes RSA from PyCrypto library
# Inspired from http://coding4streetcred.com/blog/post/Asymmetric-Encryption-Revisited-(in-PyCrypto)
# PyCrypto docs available at https://www.dlitz.net/software/pycrypto/api/2.6/
from Crypto import Random
from Crypto.PublicKey import RSA
import base64
def generate_keys():
# RSA modulus length must be a multiple of 256 and >= 1024
modulus_length = 256*4 # use larger value in production
@btroncone
btroncone / ngrxintro.md
Last active March 5, 2025 20:40
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@hhcordero
hhcordero / 1_Dockerised_JMeter.md
Last active January 28, 2025 12:59
Dockerized JMeter - A Distributed Load Testing Workflow
@chriswhong
chriswhong / index.html
Last active January 6, 2024 02:23
D3 Sankey Link with Variable Width
<!DOCTYPE html>
<meta charset="utf-8">
<title>Variable Width Sankey Link</title>
<style>
path {
fill: steelblue;
}
</style>
@a-h
a-h / 11-weblogic.rb
Created June 11, 2015 14:38
WebLogic Logstash Filter
filter {
## WebLogic Server Http Access Log
if [type] == "weblogic-access" {
grok {
match => [ "message", "%{IP:client} - - \[(?<timestamp>%{MONTHDAY}[./-]%{MONTH}[./-]%{YEAR}:%{TIME}\s+%{ISO8601_TIMEZONE})] \"%{WORD:verb} %{URIPATHPARAM:uri}\s+HTTP.+?\" %{NUMBER:status} %{NUMBER:response_time}" ]
}
date {
match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
}
}
@cevaris
cevaris / generate_key.sh
Last active May 5, 2024 19:34
Sign and Verify using Python pycrypto
#!/usr/bin/env bash
# Generate RSA private key
openssl genrsa -out private_key.pem 1024
@powersa
powersa / us.json
Created January 7, 2015 07:48
US states as GeoJson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shihpeng
shihpeng / Main.java
Last active November 8, 2022 18:23
LogStash-Forwarder (Lumberjack) client Java implementation
import javax.net.ssl.*;
import java.io.*;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.zip.Deflater;
/*
* This is a simple implementation of the Lumberjack client.