Skip to content

Instantly share code, notes, and snippets.

@VimleshS
VimleshS / ansible-summary.md
Created Aug 28, 2020 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick
View ansible-summary.md

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

View Golang program stdin stdout interaction.md

Go program interaction

Example of how to use stdout and stdin from other programs in golang

Requires go

Run

go run parentprocess.go
@VimleshS
VimleshS / cols.txt
Created Jan 16, 2019 — forked from 0/cols.txt
Brief awk tutorial
View cols.txt
abc 1 2 3
def 4 5 6
ga 7 9 10
hij 1 5 99
@VimleshS
VimleshS / patterns-of-enterprise-application-architecture.md Notes from Patterns of Enterprise Application Architecture by Martin Fowler
View patterns-of-enterprise-application-architecture.md

Patterns of Enterprise Application Architecture

By Martin Fowler (2002)

Chapter 1: Layering

A basic example of layering: FTP < TCP < IP < Ethernet

Benefis of layering:

  • You can understand a layer without knowing much about the others.
  • Minimize dependencies.
@VimleshS
VimleshS / ApiClient.cs
Created Nov 5, 2017 — forked from craigrbruce/ApiClient.cs
An example REST API client for C#
View ApiClient.cs
/*
Call the api client like this:
var client = new ApiClient<SEnvelope>("https://baseurl.com/api/v1");
//you would overload and add an auth_token param here
client.GetDtoAsync("envelopes", "object_id", (response) => //callback
{
this.SEnvelope = response.Data;//should be an envelope from the server
});
@VimleshS
VimleshS / ruby_cert.rb
Created Aug 30, 2016
Usage examples of ruby’s openssl lib
View ruby_cert.rb
#Reference
#https://devnotcorp.wordpress.com/2012/08/21/usage-examples-of-rubys-openssl-lib/
#!/usr/bin/ruby
require 'openssl'
require 'date'
require 'time'
@VimleshS
VimleshS / tls-client.go
Created Aug 30, 2016 — forked from michaljemala/tls-client.go
SSL Client Authentication Golang sample
View tls-client.go
package main
import (
"crypto/tls"
"crypto/x509"
"flag"
"io/ioutil"
"log"
"net/http"
)
@VimleshS
VimleshS / golang-tls.md
Created Aug 30, 2016 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
View golang-tls.md
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
@VimleshS
VimleshS / gist:a6f98f55bab85afb6d5a704515ba6678
Created Jun 13, 2016 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview
View gist:a6f98f55bab85afb6d5a704515ba6678

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@VimleshS
VimleshS / gist:e5320d81f55b758f0babc16f912332d0
Created May 6, 2016 — forked from telephone/gist:3869611
Sublime Text 2 - Useful Shortcuts
View gist:e5320d81f55b758f0babc16f912332d0

Sublime Text 2 – Useful Shortcuts (Ubuntu)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command palette
Ctrl+` python console
Ctrl+N new file

Editing