Skip to content

Instantly share code, notes, and snippets.

https = require 'https'
module.exports.request = ( options, success_handler, error_handler) ->
req_data = if options.data? then JSON.stringify options.data else ""
options['headers'] ?= {}
options['headers']['Content-length'] = req_data.length
req = https.request options, (res) ->
data = ''
res.on 'data', (c) ->
data += c
#
#= dump database to yaml for fixtures
#
# originated by elm200 <http://d.hatena.ne.jp/elm200/20070928/1190947947>
#
#== install
#
# move this file to RAILS_ROOT/lib/tasks/extract_fixtures.rake
#
namespace :db do
@iangreenleaf
iangreenleaf / lychee_tag.rb
Last active April 7, 2021 04:48 — forked from tobru/lychee_tag.rb
A Liquid tag for Jekyll sites that allows embedding Lychee albums. See https://tobrunet.ch/articles/jekyll-meets-lychee-a-liquid-tag-plugin/
# Connects Jekyll with Lychee (http://lychee.electerious.com/)
#
# # Features
#
# * Generate album overview and link to image
# * Caching of JSON data
#
# # Usage
#
# {% lychee_album <album_id> %}