Skip to content

Instantly share code, notes, and snippets.

@pandeybk
pandeybk / get_links.js
Last active April 5, 2016 20:46
get all links and post to console
import ansible.module_utils.one
import kitchen.text, ansible.module_utils.two, docutils, ansible.module_utils.three, distutils.sysconfig
import ansible.module_utils.four.parse
from ansible.module_utils.five import *
from ansible.module_utils.six import parse
from ansible.module_utils import seven
from ansible.module_utils import eight, nine
from ansible.module_utils.ten.foo import parse
b = 1 ; import ansible.module_utils.eleven
@pandeybk
pandeybk / password.py
Created April 5, 2016 20:26 — forked from henkjanverkerk/password.py
Simple password generator
import random
def main():
length = int(raw_input('How long should your password be?\n'))
print("Here's the password I generated: " + "".join(random.sample('QWERTYUIOPASDFGHJKLZXCVBNM1234567890abcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_+', length)))
main()
@pandeybk
pandeybk / README.md
Created November 4, 2015 10:05 — forked from lusis/README.md
A sample recipe to install my erlang tarballs with the maximum amount of idempotence

Notes

While I call s3_file and use my databag_decrypt helpers, you can point to the downloads in my github repo here: https://github.com/lusis/erlang-and-centos/

The sha256 is in the filename so the checksum operator should work.

This is about as idempotent as I can get the cookbook. I've tested multiple scenarios:

  • missing symlink
  • missing installed product
  • from scratch with neither symlink or installed product
@pandeybk
pandeybk / move_to_rds.rb
Last active September 8, 2015 13:50 — forked from guenter/move_to_rds.rb
A quick and dirty script to move a database into Amazon RDS (or any other database). Can transfer part of the data beforehand.
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
@pandeybk
pandeybk / build.sh
Last active August 29, 2015 14:14 — forked from jonah-williams/build.sh
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html