Skip to content

Instantly share code, notes, and snippets.

View VladRassokhin's full-sized avatar

Vladislav Rassokhin VladRassokhin

View GitHub Profile
@ismell
ismell / README.md
Last active July 20, 2018 09:52
Ubuntu Upstart Script for Team City

Ubuntu Upstart Script for Team City

  1. Install TeamCity.conf and TeamCityAgent.conf in /etc/init/

  2. Create TeamCity in /etc/default/TeamCity

  3. Make sure TEAMCITY_DATA_PATH and TEAMCITY_SERVER_PATH are owned by www-data

  4. Start TeamCity

     sudo service TeamCity start
    
@VladRassokhin
VladRassokhin / gravatar.tag
Created June 8, 2012 23:15
Simple gravatar.tag for JSP
<%@ tag import="java.util.Formatter"
%><%@ tag import="java.security.MessageDigest"
%><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"
%><%@ attribute name="email" required="true" type="java.lang.String"
%><%@ attribute name="sz" required="false" type="java.lang.Integer"
%><c:if test="${empty sz}"><c:set var="sz">20</c:set></c:if><c:choose
><c:when test="${empty email}"><c:set var="hash">00000000000000000000000000000000</c:set></c:when><c:otherwise
><c:set var="hash"><%=javax.xml.bind.DatatypeConverter.printHexBinary(MessageDigest.getInstance("MD5").digest(email.toLowerCase().trim().getBytes("UTF-8"))).trim().toLowerCase()%></c:set></c:otherwise
></c:choose><img class="gravatarimg${sz}" src="http://www.gravatar.com/avatar/${hash}?s=${sz}&d=mm" alt="">
@VladRassokhin
VladRassokhin / raid_ephemeral.sh
Last active August 29, 2015 14:27 — forked from joemiller/raid_ephemeral.sh
detect all ephemeral disks on EC2 then stripe together in a raid-0 vol mounted at /mnt
#!/bin/bash
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe
# mounted at /mnt. It should be run early on the first boot of the system.
#
# Beware, This script is NOT fully idempotent.
#
METADATA_URL_BASE="http://169.254.169.254/2012-01-12"