Prerequisites: Using internal-sftp for sftp; rsyslog for logging
Step 1. Set up your chrooted directories
sudo mkdir /sftp/myshare
sudo mkdir /sftp/myothershare
Step 2. Create your groups for your chrooted users
import requests, re, sys | |
url = "https://mobile.twitter.com/{}/following" | |
cursor = "" | |
usernames = [] | |
first = True | |
if len(sys.argv) < 2: | |
print("Usage: python followers.py <username>") | |
quit(1) |
import simplejson as json | |
import urllib | |
followers = json.load(open("followers.json"))["ids"] | |
offset = 100 | |
alldata = [] | |
csv = "name\tfollowers\tfriends\tstatuses\tfollowing\n" | |
for i in range(1+len(followers) / offset): |
import os | |
# Automatically set the __all__ variable with all | |
# the available plugins. | |
plugin_dir = "plugins" | |
__all__ = [] | |
for filename in os.listdir(plugin_dir): | |
filename = plugin_dir + "/" + filename |
pipeline { | |
agent { node { label 'swarm-ci' } } | |
environment { | |
TEST_PREFIX = "test-IMAGE" | |
TEST_IMAGE = "${env.TEST_PREFIX}:${env.BUILD_NUMBER}" | |
TEST_CONTAINER = "${env.TEST_PREFIX}-${env.BUILD_NUMBER}" | |
REGISTRY_ADDRESS = "my.registry.address.com" | |
SLACK_CHANNEL = "#deployment-notifications" |
#!/usr/bin/env bash | |
PGSQL_DATA_PATH='/data/pg' | |
SERVER_CONTAINER="postgresql-server" | |
DATA_CONTAINER="postgresql-data" | |
function getStatus(){ | |
CONTAINER_ID=$(docker ps -a | grep -v Exit | grep $SERVER_CONTAINER | awk '{print $1}') | |
if [[ -z $CONTAINER_ID ]] ; then | |
echo 'Not running.' |
#You can also output all your indexes together with their size: | |
rs.slaveOk(); | |
db.getCollectionNames().forEach(function(coll) { | |
print("db." + coll + ".ensureIndex(" + tojson(index.key) + ")"); | |
db.[coll].stats().indexSizes | |
}); | |
MongoDB upstart scripts for Ubuntu. | |
Run following commands after installing upstart scripts: | |
ln -s /lib/init/upstart-job /etc/init.d/mongoconf | |
ln -s /lib/init/upstart-job /etc/init.d/mongodb | |
ln -s /lib/init/upstart-job /etc/init.d/mongos | |
To start services use: |
azure | |
account | |
list [options] #List the imported subscriptions | |
show [options] [subscriptionNameOrId] #Show details about a subscription | |
set [options] <subscriptionNameOrId> #Set the current subscription | |
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info | |
import [options] <file> #Import a publishsettings file or certificate for your account | |
download [options] #Launch a browser to download your publishsettings file | |
env... #Commands to manage your account environment |
Let's say you're using Ubuntu 13.04 (Raring Ringtail, released in April 2013) and it just went End-of-Life on you, because it's supported for only 6 months, and the deprecated packages are taken down after 12 months.
You'll probably figure this out the hard way. When you run sudo apt-get update
, it will eventually report these errors:
Ign http://archive.ubuntu.com raring-updates/universe Sources/DiffIndex
Err http://security.ubuntu.com raring-security/main Sources
404 Not Found [IP: 91.189.91.15 80]
Err http://security.ubuntu.com raring-security/universe Sources
404 Not Found [IP: 91.189.91.15 80]