Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Akhil Jalagam akhilin

🎯
Focusing
Block or report user

Report or block akhilin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@akhilin
akhilin / redis-systemd.rules
Created Jul 17, 2019
redis-systemd.rules
View redis-systemd.rules
<p>According to the <a href="https://www.freedesktop.org/software/systemd/man/systemd.service.html" rel="nofollow">docs</a>, <code>supervised systemd</code> is intended solely for <code>Type=notify</code> and <code>daemonize yes</code> corresponds to <code>Type=forking</code>.</p>
<p>Alternative settings that seem to be equivalent:</p>
<table>
<thead>
<tr>
<th><code>redis.conf</code></th>
<th><code>redis.service</code></th>
</tr>
</thead>
<tbody>
@akhilin
akhilin / bind.c
Created Jun 28, 2019
bind interface
View bind.c
/*
Copyright (C) 2000 Daniel Ryde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@akhilin
akhilin / tracefile
Last active Jun 21, 2019
tracefile: Output from cmd on stdout can mess up output from strace.
View tracefile
#!/usr/bin/perl
=head1 NAME
tracefile - list files being accessed
=head1 SYNOPSIS
B<tracefile> [-adeflnruw] I<command>
@akhilin
akhilin / synapse.service
Created Jun 14, 2019
systemd service unit for matrix synapse server 1.0.0 stable release. Tweak with your own config.
View synapse.service
[Unit]
Description=Synapse Matrix homeserver
After=postgresql-9.6.service
[Service]
Type=simple
WorkingDirectory=/root/synapse/env
ExecStart=/root/synapse/env/bin/python -m synapse.app.homeserver --config-path=/root/synapse/env/bin/homeserver.yaml
ExecStop=/root/synapse/env/bin/synctl stop /root/synapse/env/bin/homeserver.yaml
View Install deluge on CentOS 7
# Centos 7.1
yum -y install wget
wget http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
rpm -ivh nux-dextop-release-0-5.el7.nux.noarch.rpm
yum -y install deluge-web
systemctl start deluge-web
systemctl stop firewalld
View bash.generate.random.alphanumeric.string.sh
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@akhilin
akhilin / riak.service
Created Apr 15, 2019 — forked from indykish/riak.service
Archlinux riak systemd service with ulimit fix
View riak.service
#Checkout for a free launch at, https://www.megam.io
[Unit]
Description=Distributed key/value store from Basho Technologies
After=network.target
[Service]
LimitNOFILE=infinity
LimitMEMLOCK=infinity
User=riak
Type=forking
View bind.c
/*
Copyright (C) 2000 Daniel Ryde
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
View bindhack.c
/*
A simple LD_PRELOAD hack to let you specify the source address
for all outbound connections or if you want to limit a process
to only listening on one IP
Copyright (C) 2005 Robert J. McKay <robert@mckay.com>
License: You can do whatever you want with it.
@akhilin
akhilin / aws.md
Created Jan 29, 2019 — forked from colinvh/aws.md
AWS Region Names
View aws.md

Alternative naming schemes for AWS regions

Purpose

The intent is to define terse, standards-supported names for AWS regions.

Schemes

You can’t perform that action at this time.