This file contains 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 | |
# venv.sh | |
# | |
# Installation: | |
# Add this line to your .bashrc or .bash-profile: | |
# | |
# source /path/to/venv.sh | |
# | |
# Whenever a directory has a file called `.venv` its contents | |
# will be interpreted as the path to a base directory of |
This file contains 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 | |
# | |
# Starts up a MongoDB replica set | |
# | |
# There is a lot of documentation about replica sets: | |
# | |
# http://docs.mongodb.org/manual/reference/replica-configuration/ | |
# http://docs.mongodb.org/manual/administration/replica-sets/ | |
# | |
# To read data from a SECONDARY, when in the client, use: |
This file contains 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 | |
# | |
# Copies the PUB key to a server via SCP then adds it to | |
# .ssh/authorized_keys. | |
# | |
# Must be invoked like this: | |
# scp-pub-remote.sh user@server | |
declare -r REMOTE=$1 |
This file contains 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
/* | |
* truncate.cpp | |
* | |
* Created on: Sep 4, 2013 | |
* Author: marco | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <unistd.h> |
This file contains 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
package com.alertavert.samples; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import java.net.Inet4Address; | |
/** | |
* Simple example to show how to create a Java @link{InetAddress} from a JSON representation. | |
* | |
* <p>Jackson will try to use the @link{Inet4Address#Inet4Address(String, int)} constructor, and it |
This file contains 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
package com.rivermeadow.plugins.simple; | |
import com.rivermeadow.babysitter.alerts.AlertPlugin; | |
import com.rivermeadow.babysitter.alerts.Context; | |
import com.rivermeadow.babysitter.alerts.Pager; | |
import com.rivermeadow.babysitter.model.Server; | |
/** | |
* Simplest example of a ``babysitter`` plugin, does nothing but demonstrate how to create a pluggable component. | |
* |
This file contains 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
{ | |
"auto_complete_commit_on_tab": true, | |
"auto_complete_selector": "source - comment", | |
"margin": 4, | |
"rulers": [80, 100], | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"highlight_line": true, |
This file contains 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/env python | |
__author__ = 'Marco Massenzio <m.massenzio (at) gmail com' | |
""" Simple python decorator example. | |
@see: http://codetrips.com/2014/01/27/python-decorators-again | |
""" | |
from functools import wraps |
This file contains 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 | |
# | |
# Failure reporter, logs to a well-known log file failure messages | |
# | |
# Created 2014-04-30, M. Massenzio ([email protected]) | |
declare -r LOGFILE="/var/log/fail.log" | |
declare -r ALERT_ICON="/usr/share/icons/ubudao-style/actions/dialog-warning.png" | |
declare -r ERROR_ICON="/usr/share/icons/ubudao-style/actions/stock_dialog-error.png" |
This file contains 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
# Copyright AlertAvert.com (c) 2013. All rights reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, |
OlderNewer