Skip to content

Instantly share code, notes, and snippets.

Adam Misiorny adam187

View GitHub Profile
# Fail on first error
set -e
APP=${1?dokku app name required}
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 /
Created Oct 24, 2016 — forked from njadhav1/
Backup MongoDB collection and upload to AWS s3
# 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

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>
adam187 / console
Created May 31, 2015
symfony app console with deprecated errors silenced
View console
#!/usr/bin/env php
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read for more information
require_once __DIR__.'/bootstrap.php.cache';
View reference.yml
# Inspired from
type: entity
repositoryClass: MyRepositoryClass
table: my_entity
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 | php
mv composer.phar /usr/local/bin/composer
View angular-socket.js
//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.
You can’t perform that action at this time.