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 a local server for testing purposes:
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 a local server for testing purposes:
| def get_validated_user_input | |
| while true | |
| input = get_user_input | |
| break if yield(input) | |
| print_invalid_message | |
| end | |
| input | |
| end | |
| user_move = get_validated_user_input {|input| move_valid?(input, board)} |
| <cfscript> | |
| // I am the name of the JavaScript method to invoke with the response data. | |
| param name="url.callback" type="string"; | |
| // I am here to simulate HTTP latency (and to make the demo more interesting). | |
| sleep( 1000 ); | |
| data = [ | |
| { |
| <cfscript> | |
| // I am the name of the JavaScript method to invoke with the response data. | |
| param name="url.callback" type="string"; | |
| // I am here to simulate HTTP latency (and to make the demo more interesting). | |
| sleep( 1000 ); | |
| data = [ | |
| { |
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
| % curl -s https://static.rust-lang.org/rustup.sh | sudo sh | |
| rustup: CFG_CURL := /usr/bin/curl (curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5) | |
| rustup: CFG_TAR := /usr/bin/tar (bsdtar 2.8.3 - libarchive 2.8.3) | |
| rustup: CFG_FILE := /usr/bin/file | |
| rustup: CFG_SHA256SUM := | |
| rustup: CFG_SHASUM := /usr/bin/shasum (5.84) | |
| rustup: | |
| rustup: processing sh args | |
| rustup: | |
| rustup: CFG_PREFIX := |
| image.gallery <- function(url, ncol = 3L) { | |
| ## This function reformats the contents of a Craigslist search result URL | |
| ## into an image gallery, opened into the default browser | |
| ## | |
| ## Inputs: | |
| ## - url: a Craigslist search URL as created by search.url | |
| ## - ncol: the number of columns for the output image gallery | |
| ## | |
| ## Output: none. As a side effect, a browser is opened. |
| # My steps for creating a DigitalOcean server to run non-exit Tor node for just $5/mo | |
| # Screen shots of my setup process: https://plus.google.com/photos/+DrewFustini/albums/6057260188204970945 | |
| # Create Digital Ocean account: https://www.digitalocean.com/ | |
| # Create Droplet on Digital Ocean: select $5/mo, and select Debian 7.0 64-bit | |
| # This instructions are based on Tor Project: https://www.torproject.org/docs/tor-relay-debian.html.en | |
| afustini@lappy486:~$ ssh [email protected] | |
| [email protected]'s password: | |
| You are required to change your password immediately (root enforced) | |
| Linux Tor300SoF 3.2.0-4-amd64 #1 SMP Debian 3.2.54-2 x86_64 |
| #!/bin/bash | |
| # | |
| # DESCRIPTION: | |
| # | |
| # Set the bash prompt according to: | |
| # * the branch/status of the current git repository | |
| # * the branch of the current subversion repository | |
| # * the return value of the previous command | |
| # | |
| # USAGE: |
| 'use strict'; | |
| angular.module('templates', []).run([ '$templateCache', function($templateCache) { | |
| <% | |
| environment.context_class.instance_eval { include ActionView::Helpers::JavaScriptHelper } | |
| app_root = File.expand_path('../', __FILE__) | |
| html_templates = File.join(app_root, %w{templates ** ** *.html }) | |
| templates = Dir.glob(html_templates) |