This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- include_vars: secrets.yml | |
- apt: pkg=fuse state=absent | |
- apt: pkg={{ item }} state=present update_cache=yes | |
with_items: | |
- build-essential | |
- libcurl4-openssl-dev | |
- libxml2-dev | |
- mime-support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# All credit goes to Marek Bosman. | |
# Source: https://marekbosman.com/site/automatic-update-of-cloudflare-ip-addresses-in-nginx/ | |
# Location of the nginx config file that contains the CloudFlare IP addresses. | |
CF_NGINX_CONFIG="/etc/nginx/cloudflare" | |
# The URLs with the actual IP addresses used by CloudFlare. | |
CF_URL_IP4="https://www.cloudflare.com/ips-v4" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"net/http" | |
"github.com/codegangsta/martini" | |
"github.com/garyburd/redigo/redis" | |
"github.com/martini-contrib/render" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@mixin hover-state { | |
&:hover, &:active, &:focus { | |
@content; | |
} | |
} | |
a { | |
text-decoration: none; | |
@include hover-state { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. No way of reusing task output in main play. | |
2. Cannot specify multiple fail_when statements. | |
3. [*] A play is atomic, i.e. I can't take the output from a command, parse its json then act on it. I need to create an intermediary fact containing the json dict then use that in another play. It's tedious. | |
4. If you're missing a variable in a variable file, Ansible won't fail to parse it. It will just tell you "VARIABLE IS NOT DEFINED!," which is ambiguous | |
5. Doing anything "complicated" (like looping within a loop for deeply nested Ansible variables) is right out. | |
6. selectattr doesn't actually do what you think it does! | |
7. Missing vars within tasks or roles can lead to very very VERY cryptic errors | |
8. So you can't set booleans with set_facts without casting......... https://github.com/ansible/ansible/issues/5463 | |
9. It would be great if I could say something like: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.application.Application; | |
import javafx.beans.property.SimpleIntegerProperty; | |
import javafx.beans.property.SimpleStringProperty; | |
import javafx.collections.FXCollections; | |
import javafx.collections.ObservableList; | |
import javafx.geometry.Insets; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Label; | |
import javafx.scene.control.SelectionMode; | |
import javafx.scene.control.TableColumn; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- example for the http://retinafy.me ebook --> | |
<style> | |
div.rss { | |
background: url(rss.svg); | |
width: 32px; | |
height: 32px; | |
} | |
body.no-svg div.rss { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub vcl_hit { | |
if (obj.ttl >= 0s) { | |
# normal hit | |
return (deliver); | |
} | |
# We have no fresh fish. Lets look at the stale ones. | |
if (std.healthy(req.backend_hint)) { | |
# Backend is healthy. Limit age to 10s. | |
if (obj.ttl + 10s > 0s) { | |
set req.http.grace = "normal(limited)"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can ssh into the VM by finding the IP (from kubectl config view) and using username "docker" password "tcuser": | |
ssh docker@192.168.XX.XX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="levels"> | |
{{ $groups := .LevelGroups }} | |
{{ $groupedLevels := .Levels }} | |
{{ $completeLevels := .CompleteLevels }} | |
{{ if $groupedLevels }} | |
{{ range $group := $groups }} | |
<div class="intro"><h2>{{$group}}</h2></div> | |
{{ range index $groupedLevels $group }} | |
<a href="/level/{{.Number}}" class="{{if index $completeLevels .Number}}complete{{end}}"> | |
<span class="level">{{.Number}} </span> |
OlderNewer