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 { Redirect } from 'react-router' | |
export default class ContactForm extends Component { | |
constructor () { | |
super(); | |
this.state = { | |
fireRedirect: 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
Show hidden characters
{ | |
"presets": ["es2015", "stage-0"], | |
"plugins": [ | |
"transform-decorators-legacy", | |
"transform-export-extensions" | |
] | |
} |
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
require 'sinatra' | |
# Set port for compatability with Nitrous.IO | |
configure :development do | |
set :bind, '0.0.0.0' | |
set :port, 3000 # Not really needed, but works well with the "Preview" menu option | |
end | |
get '/' do | |
"Sinatra on Nitrous.IO" |
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
require 'anemone' | |
require 'mongo' | |
# MongoDB setup | |
db = Mongo::Connection.new.db("demo") | |
urls_collection = db["page_urls"] | |
#New Anemone web crawler setup and main operation | |
Anemone.crawl("http://www.fondazionecollegiopiox.org") do |anemone| | |
anemone.storage = Anemone::Storage.MongoDB |
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
@mixin no-select { | |
-webkit-touch-callout: none; | |
-webkit-user-select: none; | |
-khtml-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} |
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
#!/usr/bin/env ruby | |
# Libraries::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
require 'rubygems' | |
require 'sinatra/base' | |
require 'slim' | |
require 'sass' | |
require 'coffee-script' | |
# Application::::::::::::::::::::::::::::::::::::::::::::::::::: |
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 detectBackOrForward = function(onBack, onForward) { | |
hashHistory = [window.location.hash]; | |
historyLength = window.history.length; | |
return function() { | |
var hash = window.location.hash, length = window.history.length; | |
if (hashHistory.length && historyLength == length) { | |
if (hashHistory[hashHistory.length - 2] == hash) { | |
hashHistory = hashHistory.slice(0, -1); | |
onBack(); |