Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am andruby on github.
* I am andruby (https://keybase.io/andruby) on keybase.
* I have a public key ASBj0FUjfCcUqPVmDD-JD_DHp5wmrRkFVuWEOLYepFbDIQo
To claim this, I am signing this object:
@andruby
andruby / main.liquid
Created March 19, 2019 14:43
Hello Liquid
Hello user
Let's say hi 5 times
{% for i in (1..5) %}
Hi {{ i }}
{% endfor %}
@andruby
andruby / gist:b8136abee4321bb24eecd9c6e793ebbc
Created March 31, 2017 15:23 — forked from clintel/gist:1155906
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@andruby
andruby / schedule.rb
Created June 30, 2016 09:01
Sidekiq pusher
job_type :sidekiq, 'cd :path && bundle exec script/sidekiq_pusher.rb :worker :task'
every 1.hour do
sidekiq "job_name", worker: 'WorkerName'
end
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andruby
andruby / clone-web-venture.diff
Last active August 29, 2015 14:20
diff -bur onegame/web/venture onegame-2/web/venture
diff -bur ./app/adapters/session.js ../../../onegame-2/web/venture/app/adapters/session.js
--- ./app/adapters/session.js 2015-05-08 09:50:25.000000000 +0200
+++ ../../../onegame-2/web/venture/app/adapters/session.js 2015-05-08 09:36:43.000000000 +0200
@@ -1,4 +1,5 @@
-import Adapter from './application';
+import Adapter from 'basegame/adapters/application';
export default Adapter.extend({
namespace: 'api',
});
+
@andruby
andruby / cloud-config.yml
Last active November 3, 2016 02:16
Cloud init for a Discourse instance running on Ubuntu 14.04 on Digital Ocean
#cloud-config
apt_upgrade: true
packages:
- zsh
- docker
- vim
users:
- name: andrew
ssh-authorized-keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDElTSlnjEpU91nk4HKluGCzEXwkWE2XzdXqdmU9HJA+i5zP5UHnd7AtWmcO6OG6DbY2cUpdWE/l82dqYWxwhG0811hRsErz/DMesK2Hn22Dh97K9RAH7+e1s0eh7LkrNv0F5zgvNd1YaDQo5Lu9LMws+nhQeS8+MJ7YwluRhA8Xlbz7/eqKyPeuRTTjOT2Bz17aqXSet3Uqjs51n322I9FPQR369v+jNdb62JXpfTQVxacM59kOd5yOtYQnTRRTnZhJpFocnO0fPBpXjVjKqJM1AdHnaIgoux8LU2bVEZmzWnPxwGbOjjvxWurEyFfXbvUkYoRQWeau+sONbwMsftP andrew@bedesign.be
diff --git a/web/gate/package.json b/web/gate/package.json
index e3dc156..04cb424 100644
--- a/web/gate/package.json
+++ b/web/gate/package.json
@@ -36,5 +36,8 @@
"express": "^4.8.5",
"glob": "^4.0.5",
"rails-csrf": "git+https://github.com/andruby/rails-csrf.git#fix-promise"
+ },
+ "dependencies": {
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#define CANARY "in_the_coal_mine"
struct {
char buffer[1024];
@andruby
andruby / encfs-agent.py
Last active August 29, 2015 14:04 — forked from mprymek/encfs-agent
#! /usr/bin/env python2
"""
encfs-agent
Mounts encfs filesystems with passwords generated using private keys stored in ssh-agent.
You can have any number of encrypted filesystems ("vaults") under VAULTS_DIR. Password for
each of them is derived from its name and given private key stored in ssh-agent.
You can use ssh-askpass for ssh-agent if you want.