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 React, { Component } from 'react'; | |
import { connect } from 'react-redux'; | |
import _isEmpty from 'lodash/isEmpty'; | |
import bowser from 'bowser'; | |
const userAgent = bowser.detect(window.navigator.userAgent); | |
class WaveformAnimated extends Component { | |
constructor(props) { | |
super(props); |
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
server { | |
listen 80; | |
server_name yourdomain.com www.yourdomain.com; | |
location ~ ^/.well-known { | |
root /var/www/ghost; | |
} | |
location / { | |
return 301 https://$server_name$request_uri; |
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
server { | |
listen 80; | |
server_name yourdomain.com www.yourdomain.com; | |
return 301 https://www.yourdomain.com$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name yourdomain.com; | |
return 301 $scheme://www.yourdomain.com$request_uri; |
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
// whichAndroid() | |
// | |
// Checks the userAgent to see if it's an Android device and returns the version | |
// number if true. Returns false on all other browsers/devices. | |
let whichAndroid = function() { | |
var userAgent = navigator.userAgent.toLowerCase(); | |
var check = userAgent.match(/android\s([0-9\.]*)/); | |
return check ? check[1] : false; | |
}; |
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
<Directory "/path/to/folder/containing/images"> | |
# If you have specific sub-domains you can list them instead | |
# of using the '*' wildcard. | |
Header always set Access-Control-Allow-Origin "*" | |
</Directory> |
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
// resizeCanvas() | |
// | |
// Resizes the background canvas element to maintain img proportions | |
// while centering and stretching canvas to fill fullscreen. | |
let resizeCanvas = function(img_ratio) { | |
let window_w = window.innerWidth; | |
let window_h = window.innerHeight; | |
let window_ratio = window_w / window_h; |
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
jasidfjiosadjfiodsjaiofsdjio iosaidf | |
a | |
sdf | |
sdf | |
dsa | |
fds |
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
Show.RadioView = Marionette.LayoutView.extend({ | |
blurBackground: function() { | |
if(whichAndroid() > 4.4 || whichAndroid() === false) { | |
const img = new Image(); | |
const canvas = document.getElementById('dataCanvas'); | |
const radius = 50; | |
// Make it work with CORS | |
img.crossOrigin = ''; | |
img.src = this.imageURL; |
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
server { | |
listen 80; | |
listen [::]:80; | |
server_name robertnealan.com; | |
root /var/www/ghost/system/nginx-root; | |
location / { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |