Skip to content

Instantly share code, notes, and snippets.

View vedarthk's full-sized avatar
🛠️
building...

Vedarth Kulkarni vedarthk

🛠️
building...
View GitHub Profile

Keybase proof

I hereby claim:

  • I am vedarthk on github.
  • I am vedarthk (https://keybase.io/vedarthk) on keybase.
  • I have a public key whose fingerprint is 7CE1 00C6 1BB8 397D 99A3 D4BC 8A85 C474 0015 ECD5

To claim this, I am signing this object:

@vedarthk
vedarthk / authorize_keys.sh
Created July 10, 2018 07:29
Authorize keys from IAM in SSH
#!/bin/bash -e
if [ -z "$1" ]; then
exit 1
fi
UserName="$1"
# replace the sanitized characters with omitted while importing before fetching data from IAM
/opt/awscli/bin/aws iam list-ssh-public-keys --user-name $UserName --query "SSHPublicKeys[?Status == 'Active'].[SSHPublicKeyId]" --output text | \
@vedarthk
vedarthk / import_iam_users.sh
Created July 10, 2018 07:21
Add users from IAM into the machine
#!/bin/bash
set +e
aws iam list-users --query "Users[].[UserName]" --output text | \
while read User; do
UserName="$User"
# sanitize username from IAM
UserName=${UserName//+([@.])/""}
echo "username => $UserName"
if id -u "$UserName" >/dev/null 2>&1; then

Keybase proof

I hereby claim:

  • I am vedarthk on github.
  • I am vedarthk (https://keybase.io/vedarthk) on keybase.
  • I have a public key whose fingerprint is 4540 4248 F458 D728 ACDB 7B92 E75C 82A2 1F6C 9126

To claim this, I am signing this object:

@vedarthk
vedarthk / multiple_ssh_setting.md
Created October 9, 2015 06:56 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

Keybase proof

I hereby claim:

  • I am vedarthk on github.
  • I am vedarthk (https://keybase.io/vedarthk) on keybase.
  • I have a public key whose fingerprint is E2A0 8A0D 9F42 BF0E 2137 A033 7ED8 D60A 8226 2DB9

To claim this, I am signing this object:

@vedarthk
vedarthk / myservice.sh
Last active August 29, 2015 13:55 — forked from scp93ch/myservice.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: myservice
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Put a short description of the service here
# Description: Put a long description of the service here
# create stub, then run flask app in tornado on port 5000 (perhaps with supervisord config below http://supervisord.org/index.html)
#!/usr/bin/env python
from tornado.wsgi import WSGIContainer
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from myflaskapp import app
http_server = HTTPServer(WSGIContainer(app))
#!/usr/bin/python
# rtorrent_xmlrpc
# (c) 2011 Roger Que <alerante@bellsouth.net>
#
# Python module for interacting with rtorrent's XML-RPC interface
# directly over SCGI, instead of through an HTTP server intermediary.
# Inspired by Glenn Washburn's xmlrpc2scgi.py [1], but subclasses the
# built-in xmlrpclib classes so that it is compatible with features
# such as MultiCall objects.
@vedarthk
vedarthk / wifi-fix.sh
Created September 17, 2013 09:34
WiFi fix for ubuntu 13.x
sudo rmmod iwldvm
sudo rmmod iwlwifi
sudo modprobe iwlwifi 11n_disable=1
sudo modprobe iwldvm