Skip to content

Instantly share code, notes, and snippets.

@JoeyGo23
JoeyGo23 / jekyll-and-liquid.md
Created March 25, 2016 00:12 — forked from magicznyleszek/jekyll-and-liquid.md
Jekyll & Liquid Cheatsheet

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.

Running

Running a local server for testing purposes:

Cloudfront

First, create a new Cloudfront distribution via Amazon AWS console. Once you've done that, it's as simple as adding the following to your production environment (and staging if you run a staging environment), replacing the value with your CDN host url:

config.action_controller.asset_host = "<YOUR DISTRIBUTION SUBDOMAIN>.cloudfront.net"

See here for more info: https://devcenter.heroku.com/articles/using-amazon-cloudfront-cdn#adding-cloudfront-to-rails

@ksiomelo
ksiomelo / qrcode.rb
Created January 26, 2013 17:53
Library class for generating and saving QRCode images
#require 'action_controller'
require 'rqrcode'
require 'rqrcode-rails3/size_calculator.rb'
require 'rqrcode-rails3/renderers/svg.rb'
class LibQRCode
def self.generate_qrcode(text, options)
size = options[:size]
level = options[:level] || :h
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@t7y
t7y / Gemfile
Created March 11, 2011 22:25
postgres database.yml file for sample app
source :rubygems
gem 'rails', '3.0.4'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'ar-octopus', :git => 'git://github.com/tchandy/octopus.git', :require => "octopus"