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:
| Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
| The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
| The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
| To use: | |
| 1. Install [Ansible](https://www.ansible.com/) | |
| 2. Setup an Ubuntu 16.04 server accessible over ssh | |
| 3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
| 4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
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:
| #!/bin/bash | |
| # | |
| # SSH Exit Codes | |
| # | |
| # Using SSH in scripting is pretty standard, but sometimes you want to stop execution of a script | |
| # if a command inside an SSH session fails to exit cleanly (return 0). The key to remember is that | |
| # the ssh command's exit code will be that of the *last executed* command inside the ssh session, just | |
| # like a bash script ends with the exit code of the last command executed unless you specifically | |
| # call exit. | |
| # |
| (function (export) { | |
| var App = export.App = {}; | |
| // Stores state/current views of the App | |
| App.state = {}; | |
| App.state.currentPlayer = null; | |
| // Model containing the player | |
| App.PlayerModel = Backbone.Model.extend({}); | |
| # in your app supervisor | |
| :phx_dyn_dispatch = :ets.new(:phx_dyn_dispatch, [:named_table, :bag, :public]) | |
| defmodule DynamicDispatch do | |
| def register(group, plug, opts) do | |
| true = :ets.insert(:phx_dyn_dispatch, {group, plug, opts}) | |
| end | |
| def unregister(group, plug) do |
Edward Snowden answered questioned after a showing of CITIZENFOUR at the IETF93 meeting; this is a transcript of the video recording.
For more information, see the Internet Society article.
| #!/usr/bin/env python | |
| import cStringIO | |
| import json | |
| import pycurl | |
| import os | |
| import sys | |
| ########## | |
| # configuration |
| #!/usr/bin/env ruby | |
| # encoding: utf-8 | |
| # irb3 - Runs an IRB-esque prompt (but it's NOT really IRB!) over multiple | |
| # versions of Ruby at once (using RVM) | |
| # | |
| # By Peter Cooper, BSD licensed | |
| # | |
| # Main dependency is term-ansicolor for each impl: | |
| # rvm exec gem install term-ansicolor |
| # USAGE: Hash.from_xml:(YOUR_XML_STRING) | |
| require 'nokogiri' | |
| # modified from http://stackoverflow.com/questions/1230741/convert-a-nokogiri-document-to-a-ruby-hash/1231297#1231297 | |
| class Hash | |
| class << self | |
| def from_xml(xml_io) | |
| begin | |
| result = Nokogiri::XML(xml_io) | |
| return { result.root.name.to_sym => xml_node_to_hash(result.root)} |