Skip to content

Instantly share code, notes, and snippets.

View adam187's full-sized avatar

Adam Misiorny adam187

View GitHub Profile
#!/bin/bash
if [ "$GIT_SSH_KEY" != "" ]; then
echo "Cleaning up SSH config" >&1
echo "" >&1
# Now that npm has finished running,
# we shouldn't need the ssh key/config anymore.
# Remove the files that we created.
rm -f ~/.ssh/config
rm -f ~/.ssh/deploy_key
@adam187
adam187 / backupMongo_bucket.sh
Created October 24, 2016 14:38 — forked from njadhav1/backupMongo_bucket.sh
Backup MongoDB collection and upload to AWS s3
#!/bin/bash
########
# Purpose :- To take a backup of MongoDB Collections and upload to AWS s3
# Requirement :- Make Sure Collection.config file is present in /data/Backup/mongodb
# format for Collection.config is db|collection
# For example
# db1|collections1
@adam187
adam187 / angularjs_directive_attribute_explanation.md
Created October 14, 2015 08:48 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html
MyEntity:
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
namedQueries:
all: "SELECT u FROM __CLASS__ u"
# Class-Table-Inheritance
apt-get update
apt-get install -q -y python-software-properties
add-apt-repository ppa:ondrej/php5
add-apt-repository ppa:chris-lea/node.js
apt-get install -q -y php5 php5-fpm php5-mssql php5-gd php5-imagick php5-mysql php5-curl php5-cli php5-pgsql
apt-get remove -q -y apache2
apt-get install -q -y nginx mysql-server git curl nodejs
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
//TODO: make this a module
/**
* # SockJS socket management service
*
* Creates SockJS socket connection to server, re-connects on disconnection,
* and exports hooks to map handlers for various data interactions.
*
*/
angular.module('app').factory