📷
👍 | 💰 | 🔗 |
---|---|---|
6 | $648 | Sony A6000 |
5 | $1100 | Fuji X100T |
3 | $4250 | Leica Q |
3 | $1400 | Fuji XT1 |
2 | $950 | Sony RX100 IV |
2 | $950 | Fuji T-10 |
const sanityClient = require('@sanity/client'); | |
const crypto = require('crypto'); | |
const { | |
SANITY_API_TOKEN, | |
SANITY_PROJECT_ID, | |
SANITY_DATASET, | |
SHOPIFY_SECRET | |
} = process.env; |
import { withRouter } from 'next/router'; | |
import Link from 'next/link'; | |
import React, { Children } from 'react'; | |
const ActiveLink = ({ router, children, ...props }) => { | |
const child = Children.only(children); | |
let className = child.props.className || ''; | |
if (router.pathname === props.href && props.activeClassName) { | |
className = `${className} ${props.activeClassName}`.trim(); |
📷
👍 | 💰 | 🔗 |
---|---|---|
6 | $648 | Sony A6000 |
5 | $1100 | Fuji X100T |
3 | $4250 | Leica Q |
3 | $1400 | Fuji XT1 |
2 | $950 | Sony RX100 IV |
2 | $950 | Fuji T-10 |
.font-fix { | |
-webkit-font-smoothing: antialiased; | |
-moz-osx-font-smoothing: grayscale; | |
text-rendering: optimizeLegibility; | |
} |
These instructions will guide you through the process of setting up local, trusted websites on your own computer.
These instructions are intended to be used on macOS Sierra, but they have been known to work in El Capitan, Yosemite, Mavericks, and Mountain Lion.
NOTE: You may substitute the edit
command for nano
, vim
, or whatever the editor of your choice is. Personally, I forward the edit
command to Sublime Text:
alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
.video { position: relative; padding-bottom: 56.25%; /* 16:9 */ height: 0; } | |
.video img { position: absolute; display: block; top: 0; left: 0; width: 100%; height: 100%; z-index: 20; cursor: pointer; } | |
.video:after { content: ""; position: absolute; display: block; | |
background: url(play-button.png) no-repeat 0 0; | |
top: 45%; left: 45%; width: 46px; height: 36px; z-index: 30; cursor: pointer; } | |
.video iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } | |
/* image poster clicked, player class added using js */ | |
.video.player img { display: none; } | |
.video.player:after { display: none; } |
require "rubygems" | |
require "twitter" | |
require "json" | |
# things you must configure | |
TWITTER_USER = "your_username" | |
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted | |
# get these from dev.twitter.com | |
CONSUMER_KEY = "your_consumer_key" |
First, install nginx for mac with "brew install nginx". | |
Then follow homebrew's instructions to know where the config file is. | |
1. To use https you will need a self-signed certificate: https://devcenter.heroku.com/articles/ssl-certificate-self | |
2. Copy it somewhere (use full path in the example below for server.* files) | |
3. sudo nginx -s reload | |
4. Access https://localhost/ | |
Edit /usr/local/etc/nginx/nginx.conf: |
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |