Skip to content

Instantly share code, notes, and snippets.

View dinesh16's full-sized avatar

Dinesh Anthony dinesh16

  • Vanarama
  • London
View GitHub Profile
@dinesh16
dinesh16 / aws_cognito_create_user.rb
Last active February 25, 2020 09:16
Aws cognito create user in ruby
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 February 26, 2019 10:37
Install FreeTDS and tiny_tds on codeship
#!/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 December 2, 2016 12:17 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 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 October 6, 2016 08:00 — forked from lucasdavila/fixup.txt
Fixing mac os yosemite issue "bash: fork: Resource temporarily unavailable"
# 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