Skip to content

Instantly share code, notes, and snippets.

@AlexeyDemidov
AlexeyDemidov / defaults_unicorn_app
Last active Mar 24, 2021
Unicorn service file for systemd with rvm support
View defaults_unicorn_app
# save this file in /etc/default/unicorn_app
USER=app_user
APP_ROOT=/srv/app
RVM_STRING=2.2.4@app_gemset
RACK_ENV=production
UNICORN_OPTS="-D -c /srv/app/shared/config/unicorn.rb -E production"
DAEMON=unicorn
@AlexeyDemidov
AlexeyDemidov / stackexchange.html
Last active Aug 29, 2015
Stackexchange badge for octopress
View stackexchange.html
{% if site.stackexchange_user %}
<section class="googleplus">
<h1>
<a href="http://stackexchange.com/users/{{ site.stackexchange_user }}/{{ site.stackexchange_user_name }}">
<img src="http://stackexchange.com/users/flair/{{ site.stackexchange_user }}.png" width="208" height="58" alt="profile for {{ site.stackexchange_user_name }} on Stack Exchange, a network of free, community-driven Q&amp;A sites" title="profile for {{ site.stackexchange_user_name }} on Stack Exchange, a network of free, community-driven Q&amp;A sites" margin-bottom="0.5 em">
</a>
</h1>
</section>
{% endif %}
View ipacct.py
#!/usr/local/bin/python
import radix
import re
import time
import sys
def printf(format, *args):
sys.stdout.write(format % args)