Skip to content

Instantly share code, notes, and snippets.

View MohammedJabarullah's full-sized avatar

Hassan MohammedJabarullah

View GitHub Profile
@MohammedJabarullah
MohammedJabarullah / aws_emr_cli.md
Last active August 24, 2016 15:09
AWS EMR CLI

AWS EMR CLI

List of clusters

aws emr list-clusters

Get LogUri to get log locations

@MohammedJabarullah
MohammedJabarullah / solution1.md
Last active October 25, 2015 19:57
Mac OS X: Docker/Boot2Docker CiscoVPN connection issue solution

Enable port forwarding on VirtualBox Machine from 2376 on host to 2376 on guest (Settings > Network > Adapter 1 NAT > Advanced > Port Forwarding), and then export the following in a shell. Docker Compose and other docker tools will work as expected.

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://localhost:2376"

For docker-machine users:

@MohammedJabarullah
MohammedJabarullah / aws_ec2_root.md
Last active August 29, 2015 14:25 — forked from tracend/aws_ec2_root.md
AWS EC2: Steps to enable root access with your local key - Inspired by: https://forums.aws.amazon.com/thread.jspa?threadID=86876

Note: replace {{server}} with your domain or ip

  • Login as the ec2-user
ssh -i key.pem ec2-user@{{server}}
  • Switch to administrator
sudo -i
@MohammedJabarullah
MohammedJabarullah / docker_vpn_macosx_workaround.md
Last active August 29, 2015 14:25
Docker compose - VPN workaround
  • Install docker-machine

  • Install docker-compose

# Before VPN
alias dc=docker-compose
alias dm=docker-machine

# Optional: use options --virtualbox-cpu-count "4" --virtualbox-memory "4096"
To remove all containers and images:
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
{
"settings" : {
"analysis" : {
"analyzer" : {
"default" : {
"tokenizer" : "whitespace",
"filter" : [ "thesaurus_synonyms", "lowercase", "snow_en" ]
},
"make_analyzer" : {
"tokenizer" : "whitespace",
@MohammedJabarullah
MohammedJabarullah / check_xsd_xpath.xpath
Created August 1, 2012 14:28
XPath to check a XML Schema (XSD) for elements and types that don't have range / size restrictions
//xs:element[starts-with(@type, 'xs:')]/@name
| //xs:simpleType[
xs:restriction[not(xs:length) and
not(xs:minInclusive and xs:maxInclusive) and
not(xs:maxLength) and not(xs:enumeration) and
not(starts-with(@base, 'xs:dateTime')) and
not(xs:pattern[not(empty(@value))])]
]/@name