Skip to content

Instantly share code, notes, and snippets.

Adam Daigian adamdaigian

Block or report user

Report or block adamdaigian

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9c120eba4ecdd061f27d
server {
listen ${http};
server_name ${address.public};
access_log /var/log/nginx/localhost.access.log;
location / {
root ${folder}/kanye-generator;
index kanye.html;
}
@adamdaigian
adamdaigian / gist:ed6b83ab14d6444deead
Created Jun 20, 2014
MongoDB Cluster Start Script
View gist:ed6b83ab14d6444deead
{% if variables.primary.address %}
#!/bin/bash
elasticbox set mongo.username {{ variables.primary.variables.mongo.username }}
elasticbox set mongo.password {{ variables.primary.variables.mongo.password }}
HOST_ARG='--host {{ variables.REPLICA_SET }}/{{ variables.primary.address.public }} admin'
AUTH_ARGS='-u {{ variables.primary.variables.mongo.username }} -p {{ variables.primary.variables.mongo.password }}'
HOST_GREP='"name" : "{{ address.public }}:{{ variables.mongo.mongodb }}"'
ADD_COMMAND="printjson(rs.add('{{ address.public }}:{{ variables.mongo.mongodb }}'))"
@adamdaigian
adamdaigian / gist:5677fa177a38a4b0e48d
Last active Aug 29, 2015
MongoDB Cluster Install Script
View gist:5677fa177a38a4b0e48d
#!/bin/bash
[[ -d /data ]] || mkdir /data
if [[ -f /usr/share/google/safe_format_and_mount ]];then
[[ -z $(mount | grep /data) ]] && sudo /usr/share/google/safe_format_and_mount -m "mkfs.ext4 -F" /dev/sdb /data
else
if [[ -z $(mount | grep /data) ]]; then
mkfs.ext4 /dev/xvdf
echo "/dev/xvdf /data auto noatime 0 0" | tee -a /etc/fstab
mount -a
You can’t perform that action at this time.