Skip to content

Instantly share code, notes, and snippets.

View hilios's full-sized avatar
🛠️
Breaking stuff

Edson Hilios hilios

🛠️
Breaking stuff
View GitHub Profile
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript
powered JS and SASS powered CSS with YUI compression all via the magic of rack.
This stuff will be native in Rails 3.1 and the layout of the files on the
filesystem will be different but this guide will get you working with it
while we wait for all that to finalize.
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention
@suranyami
suranyami / 0_instructions.md
Created August 18, 2011 13:26 — forked from eric1234/0_instructions.txt
Using Sprockets 2 in Rails 3.0.x with CoffeeScript & SASS

Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript powered JS and SASS powered CSS with YUI compression all via the magic of rack.

This stuff will be native in Rails 3.1 and the layout of the files on the filesystem will be different but this guide will get you working with it while we wait for all that to finalize.

Ignore the number prefixes on each file. This is just to ensure proper order in the Gist.

Note from suranyami:

@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@hilios
hilios / application.rb
Last active September 27, 2015 19:28
My default generators configuration
# Generators
config.generators do |generator|
generator.helper false
generator.stylesheets false
generator.javascripts false
generator.controllers true
generator.template_engine :haml
generator.integration_tool :rspec
generator.test_framework :rspec, controller_specs: false,
view_specs: false,
@erichiggins
erichiggins / ndb_json.py
Last active May 23, 2021 00:27
JSON serializer/deserializer adapted for use with Google App Engine's NDB Datastore API. This script can handle Model, Expando, PolyModel, Query, QueryIterator, Key, datetime, struct_time, and complex types.
#!/usr/bin/env python
"""
JSON encoder/decoder adapted for use with Google App Engine NDB.
Usage:
import ndb_json
# Serialize an ndb.Query into an array of JSON objects.
query = models.MyModel.query()

Principled Meta Programming for Scala

This note outlines a principled way to meta-programming in Scala. It tries to combine the best ideas from LMS and Scala macros in a minimalistic design.

  • LMS: Types matter. Inputs, outputs and transformations should all be statically typed.

  • Macros: Quotations are ultimately more easy to deal with than implicit-based type-lifting

  • LMS: Some of the most interesting and powerful applications of meta-programming