I hereby claim:
- I am johnmcdowall on github.
- I am jmdfm (https://keybase.io/jmdfm) on keybase.
- I have a public key whose fingerprint is 8D35 46A9 72BB 8467 6353 A9F9 776E EA02 57AF 8B0F
To claim this, I am signing this object:
IMAGE_CDN = https://apex-inc.imgix.net | |
# Imgix image replacement. | |
images: | |
@echo "==> pointing images to $(IMAGE_CDN)" | |
@find build -type f -name "*.html" | xargs sed -i '' 's|src="/images|src="$(IMAGE_CDN)/images|g' | |
@find build -type f -name "*.html" | xargs sed -i '' 's|href="/images|href="$(IMAGE_CDN)/images|g' | |
.PHONY: images |
IMAGE_CDN = https://apex-inc.imgix.net | |
# Imgix image replacement. | |
images: | |
@echo "==> pointing images to $(IMAGE_CDN)" | |
@find build -type f -name "*.html" | xargs sed -i '' 's|src="/images|src="$(IMAGE_CDN)/images|g' | |
@find build -type f -name "*.html" | xargs sed -i '' 's|href="/images|href="$(IMAGE_CDN)/images|g' | |
.PHONY: images |
I hereby claim:
To claim this, I am signing this object:
# Nginx can serve FLV/MP4 files by pseudo-streaming way without any specific media-server software. | |
# To do the custom build we use 2 modules: --with-http_secure_link_module --with-http_flv_module | |
# This module "secure-link" helps you to protect links from stealing away. | |
# | |
# NOTE: see more details at coderwall: http://coderwall.com/p/3hksyg | |
cd /usr/src | |
wget http://nginx.org/download/nginx-1.5.13.tar.gz | |
tar xzvf ./nginx-1.5.13.tar.gz && rm -f ./nginx-1.5.13.tar.gz |
defmodule MyApp.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :my_app, | |
version: get_version, | |
elixir: "~> 1.0", | |
elixirc_paths: elixirc_paths(Mix.env), | |
compilers: Mix.compilers, | |
build_embedded: Mix.env == :prod, |
Software required:
After installation and putting the youtube-dl
in PATH
youtube-dl \
#!/bin/bash | |
# | |
#DNS adblock/malware block for USG | |
# | |
#Orginal script: https://community.ubnt.com/t5/UniFi-Routing-Switching/Use-USG-to-block-sites-apps-like-ER/td-p/1497045 | |
# | |
#Howto: SSH into your USG: | |
#sudo su - | |
#vi /config/user-data/update-adblock-dnsmasq.sh (add file content) | |
#ESC :wq |
Optimizing the delivery of CSS is one way to improve user experience, load speed and SEO of your web app. This involves determining the "critical path CSS" and embeding it into the html of your page. The rest of the CSS for the site is loaded asynchronously so it does not block the rendering of your "above the fold" content. This Gist will show you how to dynamically generate critical path CSS for your Rails app.
In this example we will use the mudbugmedia/critical-path-css gem.
You will need to set up caching and Active Job in your Rails app. I recommend using a thread-safe background job manager like resque.
! __ ___ __ ___ ___ ___ _ _ _ __ ___ ___ ___ | |
! \ \/ / '__/ _ \/ __|/ _ \| | | | '__/ __/ _ \/ __| | |
! _ > <| | | __/\__ \ (_) | |_| | | | (_| __/\__ \ | |
!(_)_/\_\_| \___||___/\___/ \__,_|_| \___\___||___/ | |
! | |
!## Colors | |
#define S_base03 #191919 | |
#define S_base02 #073642 | |
#define S_base01 #586e75 | |
#define S_base00 #657b83 |
// A loading spinner with 6 dots. | |
// By @marcedwards from @bjango. | |
// | |
// Pretty messy and hacked together, but it works. ¯\_(ツ)_/¯ | |
// Created using Processing 3.3.7. | |
float scaler = 0.24 * 4; // Scale the entire design. | |
float scalerb = 4; // Scale the entire design more. | |
int frame = 0; |