| cuid | alias | tags | ||
|---|---|---|---|---|
human<% tp.file.creation_date("YYYYMMDD-HHmmss") %> |
|
person/friends, person/family, person/coworker, person/rwc |
🎂 Birthday: 💌 Email: ☎️ Phone:
| public class Colors | |
| { | |
| private const string COLOR_WHITE = "white"; | |
| private const string COLOR_BLACK = "black"; | |
| public static string GetReadableForeColorAsString(string backgroundColor) | |
| { | |
| // turn the background color into Color obj | |
| var c = ColorTranslator.FromHtml($"#{backgroundColor}"); |
Install the custom CSS plugin, then make a file on your computer that will hold your custom CSS, I like to make one in my home directory called ~/.vscodestyles.css and then add the CSS into it.
Once done, open your command palette and select enable custom CSS and JS
This gist assumes you are migrating an existing site for www.example.com — ideally WordPress — to a new server — ideally Ubuntu Server 16.04 LTS — and wish to enable HTTP/2 (backwards compatibile with HTTP/1.1) with always-on HTTPS, caching, compression, and more. Although these instructions are geared towards WordPress, they should be trivially extensible to other PHP frameworks, other FastCGI backends, and even non-FastCGI backends (using proxy in lieu of fastcgi in the terminal Caddyfile stanza).
Quickstart: Use your own naked and canonical domain names instead of example.com and www.example.com and customize the Caddyfile and VCL provided in this gist to your preferences!
These instructions target Varnish Cache 4.1, PHP-FPM 7.0, and Caddy 0.10. (I'm using MariaDB 10.1 as well, but that's not relevant to this guide.)
| .bgimage { | |
| width:100%; | |
| height:500px; | |
| background: url('https://images.unsplash.com/photo-1438109491414-7198515b166b?q=80&fm=jpg&s=cbdabf7a79c087a0b060670a6d79726c'); | |
| background-repeat: no-repeat; | |
| background-position: center; | |
| background-size:cover; | |
| background-attachment: fixed; | |
| } | |
| .bgimage h5 { |
| Step One - Starting with a single address field | |
| Edit Column > Add Column by Fetching URLs | |
| Nominatim has a limit of 1 geocode per second so make sure to set the throttle delay to greater than 1000 milliseconds | |
| Fetch URL based on column (quotes needed): | |
| "http://nominatim.openstreetmap.org/search?format=json&email=[YOUR_EMAIL_HERE].com&app=google-refine&q=' + escape(value, 'url')" | |
| ------------------------------------------------------------------------------------ | |
| Step Two - Extract lat/lon from newly created JSON blobs |
| <?php | |
| /** | |
| * Plugin Name: WooCommerce Subscriptions Date Sync | |
| * Plugin URI: | |
| * Description: Sets the start date of a subscription to September 13, 2013 | |
| * Author: Peter Wilson | |
| * Author URI: http://peterwilson.cc/ | |
| * Version: 1.0.0 | |
| */ |
| from flask import Flask, render_template_string, request | |
| class CustomFlask(Flask): | |
| jinja_options = Flask.jinja_options.copy() | |
| jinja_options.update(dict( | |
| block_start_string='<%', | |
| block_end_string='%>', | |
| variable_start_string='%%', | |
| variable_end_string='%%', | |
| comment_start_string='<#', |
| #! usr/bin/env python | |
| # -*- encoding: utf8 -*- | |
| # Requires Python 2.7, or 2.6 with argparse installed. | |
| # Currently adds task to The Hit List only to the inbox. | |
| import argparse, os |
| #!/bin/sh | |
| # modified by jfro from http://www.cnysupport.com/index.php/linode-dynamic-dns-ddns-update-script | |
| # Uses curl to be compatible with machines that don't have wget by default | |
| LINODE_API_KEY=licensekey | |
| DOMAIN_ID=domainid | |
| RESOURCE_ID=resourceid | |
| WAN_IP=`curl -s http://example.com/whatsmyip.php` | |
| if [ -f $HOME/.wan_ip.txt ]; then |