Skip to content

Instantly share code, notes, and snippets.

View suprnova32's full-sized avatar

Patricio Cano suprnova32

View GitHub Profile

How to install ipkg on a Synology DS214

After a couple of days of trying to get ipkg woking on my DS214 I found this article by trepmag. It is written for the DS213j, but it’s been working for me and others for the DS214 too.

I have done some minor changed to clarify some things, but if you are a Linux guy (unlike me) my changes might be of no use to you.

Guide

@suprnova32
suprnova32 / comway.rb
Created February 11, 2014 10:07
Ruby implementation of Comway's Game of Life
class Comway
def initialize(size)
@size = size
@grid = (1..@size*@size).map { rand(0..1)==1 ? 1 : nil }
end
def start_simulation
while true do
system 'clear'
@suprnova32
suprnova32 / nested_json.java
Created April 20, 2013 18:04
JSON nested object
// lets add some headers (nested JSON object)
JSONObject header = new JSONObject();
header.put("devicemodel", android.os.Build.MODEL); // Device model
header.put("deviceVersion", android.os.Build.VERSION.RELEASE); // Device OS version
header.put("language", Locale.getDefault().getISO3Language()); // Language
jsonobj.put("header", header);