Skip to content

Instantly share code, notes, and snippets.

@imranansari
imranansari / microservices.adoc
Created December 14, 2020 07:09 — forked from kbastani/microservices.adoc
Using Graph Analysis to Design Microservice Architectures in the Cloud

Using Graph Analysis to Design Microservice Architectures in the Cloud

This interactive Neo4j graph tutorial covers how to use graph analysis to find software modules that are highly centralized, making good candidates to be decomposed into microservices.


@imranansari
imranansari / comprehend.go
Created July 23, 2020 19:40 — forked from brydavis/comprehend.go
Example of AWS Comprehend with Go
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/comprehend"
)
@imranansari
imranansari / jenkins-add-ssh-keypair-with-password-credential.groovy
Created December 11, 2019 04:14 — forked from ivan-pinatti/jenkins-add-ssh-keypair-with-password-credential.groovy
Jenkins - Add SSH keypair with password credential via groovy script - #jenkins #groovy #ssh #credential
#!groovy
// imports
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.Domain
import com.cloudbees.plugins.credentials.impl.*
import hudson.util.Secret
import java.nio.file.Files

Keybase proof

I hereby claim:

  • I am imranansari on github.
  • I am iansari (https://keybase.io/iansari) on keybase.
  • I have a public key ASAdKTU4YYYonT1rPY8YCpF0t-vufOZuHlx15W7y6_E2hgo

To claim this, I am signing this object:

#!/bin/bash
useradd -s /bin/bash -m unprivileged
cp -rf ~/.ssh ~unprivileged/
chown -R unprivileged:unprivileged ~unprivileged/.ssh/
@imranansari
imranansari / upspin-drive-guide.md
Created May 12, 2019 23:08 — forked from fstanis/upspin-drive-guide.md
Upspin server backed by Google Drive on a Raspberry Pi

Set up an Upspin server backed by Google Drive

Overview

The purpose of this document is to explain how to deploy an Upspin server on a Debian or Ubuntu based machine - which can be a Raspberry Pi - and, optionally, use Google Drive to back the data.

Effectively, this will give you all the nifty advantages Upspin gives you in terms of file sharing without requiring a costly server.

Requirements

@imranansari
imranansari / golang-tls.md
Created March 1, 2019 06:47 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

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)
import hudson.EnvVars;
import hudson.slaves.EnvironmentVariablesNodeProperty;
import hudson.slaves.NodeProperty;
import hudson.slaves.NodePropertyDescriptor;
import hudson.util.DescribableList;
import jenkins.model.Jenkins;
public createGlobalEnvironmentVariables(String key, String value){
Jenkins instance = Jenkins.getInstance();
@imranansari
imranansari / ball-bouncing-using-vue-transition-and-css-animation.markdown
Created January 18, 2019 23:15
Ball Bouncing using Vue transition and CSS Animation

Ball Bouncing using Vue transition and CSS Animation

Showing how we can use custom CSS classes for each stage of a CSS Animation with the transition component.

A Pen by Sarah Drasner on CodePen.

License.

@imranansari
imranansari / github.bash
Created January 17, 2019 00:38 — forked from igrigorik/github.bash
Open GitHub URL for current directory/repo...
alias gh="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`"