This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
####################################################### | |
# Git Based Push to Deploy Env Setup | |
# To Use: | |
# ./push_to_deploy.sh <name of user> [optional crontab] | |
####################################################### | |
set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from pymongo import MongoClient | |
from bson import ObjectId | |
import redis | |
def cache_ids(db, cache, cache_key, reset=True, limit=1000): | |
if reset: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DISCO_USER=disco | |
# Update and clean cache | |
yum clean all -y | |
# Add EPEL repo | |
# http://wiki.centos.org/AdditionalResources/Repositories | |
# http://fedoraproject.org/wiki/EPEL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# First step we update and upgrade | |
sudo apt-get update && sudo apt-get upgrade -y | |
# Second step install git as it's almost always needed nowadays | |
sudo apt-get install git -y | |
(cd /tmp && git clone --depth 1 https://github.com/visionmedia/git-extras.git && cd git-extras && sudo make install) | |
# For Docker |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import pycurl | |
def iter_chunks(data, delimiter): | |
chunks = data.split(delimiter) | |
for chunk in chunks: |
NewerOlder