Skip to content

Instantly share code, notes, and snippets.

eikes / .block
Last active Jul 2, 2020 — forked from mbostock/.block
South up map
View .block
license: gpl-3.0
View tomt.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
eikes / gist:5a64b661022c756bd6522ed94770e2a6
Created Jul 4, 2016
List of Ruby on Rails Timezone names and their alias
View gist:5a64b661022c756bd6522ed94770e2a6
["Africa/Algiers", "West Central Africa"],
["Africa/Cairo", "Cairo"],
["Africa/Casablanca", "Casablanca"],
["Africa/Harare", "Harare"],
["Africa/Johannesburg", "Pretoria"],
["Africa/Monrovia", "Monrovia"],
["Africa/Nairobi", "Nairobi"],
["America/Argentina/Buenos_Aires", "Buenos Aires"],
["America/Bogota", "Bogota"],
["America/Caracas", "Caracas"],
eikes /
Created Dec 29, 2015
run phoenix on ubuntu
wget && sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install git esl-erlang elixir postgresql nodejs nodejs-legacy npm
sudo npm -g install brunch@1
mix local.hex
mix archive.install
git clone
eikes / run phoenix on amazon
Created Dec 28, 2015
run phoenix on amazon linux
View run phoenix on amazon
# app deps
sudo yum install git
# erlang deps
sudo yum groupinstall "Development Tools"
sudo yum install ncurses-devel
# erlang
tar -zxvf otp_src_18.1.tar.gz
eikes / .__mini_rails__
Last active May 27, 2021
Single file rails app
View .__mini_rails__
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<h1>Hello, world!</h1>
View CaseInsensitiveStringFilter.php
namespace Liip\AcmeBundle\Filter;
use Sonata\AdminBundle\Form\Type\Filter\ChoiceType;
use Sonata\AdminBundle\Datagrid\ProxyQueryInterface;
use Sonata\DoctrineORMAdminBundle\Filter\StringFilter;
class CaseInsensitiveStringFilter extends StringFilter
eikes / jquery.uncheckable_radio.js
Created Mar 11, 2014
jQuery plugin to allow unchecking radio buttons
View jquery.uncheckable_radio.js
(function ($) {
$.fn.uncheckableRadio = function () {
return this.each(function () {
var radio = this,
label = $('label[for="' + + '"]');
if (label.length === 0) {
label = $(radio).closest("label");
var label_radio = label.add(radio);
label_radio.mousedown(function () {
View collection_widget.twig
{% block collection_widget %}
{% spaceless %}
<div class="collection">
{% if prototype is defined %}
{% set attr = attr|merge({'data-prototype': block('collection_item_widget') }) %}
{% endif %}
<div {{ block('widget_container_attributes') }}>
{{ form_errors(form) }}
{% for prototype in form %}