Skip to content

Instantly share code, notes, and snippets.

Dinesh Anthony dinesh16

  • Vanarama
  • London
View GitHub Profile
@dinesh16
dinesh16 / aws_cognito_create_user.rb
Last active Feb 25, 2020
Aws cognito create user in ruby
View aws_cognito_create_user.rb
client = Aws::CognitoIdentityProvider::Client.new(
access_key_id: "xxxx",
secret_access_key: "xxxx",
region: "us-east-1"
)
# Base64 ( HMAC_SHA256 ( "Client Secret Key", "Username" + "Client Id" ) )
username = "dinesh16@gmail.com"
key = App_client_secret # (get this from amazon cognito console)
data = username + App_client_id # (get App_client_id from amazon console)
@dinesh16
dinesh16 / free_tds.sh
Last active Feb 26, 2019
Install FreeTDS and tiny_tds on codeship
View free_tds.sh
#!/bin/bash
# Install FreeTDS on Codeship - http://www.freetds.org
TDS_DIR=${TDS_DIR:=$HOME/cache/freetds}
set -e
if [ ! -d "${TDS_DIR}" ]; then
mkdir -p "${HOME}/freetds"
wget "ftp://ftp.freetds.org/pub/freetds/stable/freetds-patched.tar.gz"
@dinesh16
dinesh16 / ssl_puma.sh
Created Dec 2, 2016 — forked from tadast/ssl_puma.sh
localhost SSL with puma
View ssl_puma.sh
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@dinesh16
dinesh16 / fixup.txt
Created Oct 6, 2016 — forked from lucasdavila/fixup.txt
Fixing mac os yosemite issue "bash: fork: Resource temporarily unavailable"
View fixup.txt
# see the current limits
$ sysctl -a | grep maxproc
# increase it
$ sudo sysctl -w kern.maxproc=xxxx
$ sudo sysctl -w kern.maxprocperuid=xxx
# run at startup
$ sudo vim /etc/sysctl.conf
You can’t perform that action at this time.