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
export function useTitle(title?: string | string[]) { | |
useEffect(() => { | |
if (title) { | |
document.title = `${ | |
Array.isArray(title) ? title.join(" | ") : title | |
} | Fitness`; | |
} | |
return () => { |
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 ( | |
"context" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
_ "github.com/go-kivik/couchdb" | |
"github.com/go-kivik/kivik" |
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
A conversation from F for Fake (1973) | |
Clifford Irving: I've known Elmyr for about eight years. We met when I was broke. When I was writing fiction. I wasn't selling it very well. | |
Orson Welles: His fiction didn't sell. Elmyr's biographer's a highly gifted writer. Does it say something for this age of ours that he could only make it big by fakery? | |
Elmyr de Hory: Le grande surprise! | |
Orson Welles: Cliff Irving's caper may well be the hoax of the century, but, really, this is not, you know, in any way the century of the hoax. We hanky-panky men have always been with you. |
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
# VIA http://blog.jesse-obrien.ca/post/add-beautiful-and-effective-exception-handling-to-laravel-with-sentry | |
# Debian/Ubuntu | |
$ sudo apt-get install git supervisor htop python2.7-dev libxslt1-dev libxml2-dev libz-dev libffi-dev libssl-dev libmysqlclient-dev | |
# Get the latest version of Setup Tools | |
$ wget https://bootstrap.pypa.io/ez_setup.py -O - | python | |
# Install sentry itself and the python-mysql dependencies | |
$ sudo easy_install -UZ sentry[mysql] |
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
var middleware = function(request, response, next) { | |
response.header("Access-Control-Allow-Origin", "*"); | |
response.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization"); | |
response.header("Access-Control-Allow-Methods", "GET, PUT, POST, DELETE"); | |
response.header("Access-Control-Max-Age", "432000"); | |
if(request.method === 'OPTIONS') { |
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
# Move config files to prevent conflicts with project | |
set :deploy_config_path, 'deploy/config/deploy.rb' | |
set :stage_config_path, 'deploy/config/deploy' | |
# Load DSL and Setup Up Stages | |
require 'capistrano/setup' | |
# Includes default deployment tasks | |
require 'capistrano/deploy' |
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
// Refresh a route: | |
// In the route you want to refresh, you can place the following into an action: | |
this.refresh(); |
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
/* | |
|-------------------------------------------------------------------------- | |
| REST API default headers | |
|-------------------------------------------------------------------------- | |
| | |
| Adds extra headers for handling API requests. | |
| | |
*/ | |
App::after(function($request, $response) |
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
Feature: Donation | |
As a Movember member I want to make a donation to an individual or a team | |
Scenario Outline: As a member I want to make a general donation to an individual - Providing first name and last name for donation receipt | |
Given I am on "<path>" secure page | |
When I click "<button>" | |
Then the value of "input[name=donationAmount]" should be "<amount>" |
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
sudo fallocate -l 512m /mnt/512mb.swap | |
sudo mkswap /mnt/512mb.swap | |
sudo swapon /mnt/512mb.swap |