Set up project:
mkdir project
cd project
npm init -y
/* 1. write it out for older browsers */ | |
/* 2. use the vendor prefix for webkit */ | |
/* 3. use the vendor prefix for moz */ | |
/* 4. include the un-prefixed version last */ | |
#foo { | |
width: 200px; | |
width: -webkit-calc(50% - 100px); | |
width: -moz-calc(50% - 100px); | |
width: calc(50% - 100px); |
atom-workspace-axis.vertical atom-pane { | |
flex-direction: row; | |
.tab-bar { | |
box-shadow: inset -1px 0 0 #181a1f; | |
resize: horizontal; | |
height: auto; | |
display: block; | |
padding-right: 1px; | |
padding-bottom: 3em; | |
min-width: 14em; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="author" content="Galenic"> | |
<script src="js/jquery-1.9.1.js"></script> | |
<script src="js/knockout-2.1.0.js"></script> | |
<script src="js/Chart.js"></script> | |
<link rel="stylesheet" href="pure-min.css"> |
'use strict'; | |
// simple express server | |
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
app.use(express.static('public')); | |
app.get('/', function(req, res) { | |
res.sendfile('./public/index.html'); |
GOPATH=$(shell pwd)/vendor:$(shell pwd) | |
GOBIN=$(shell pwd)/bin | |
GOFILES=$(wildcard *.go) | |
GONAME=$(shell basename "$(PWD)") | |
PID=/tmp/go-$(GONAME).pid | |
build: | |
@echo "Building $(GOFILES) to ./bin" | |
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -o bin/$(GONAME) $(GOFILES) |
/** | |
* Given a list of items, adds and removes an active class as you hover over | |
* them. Used to create a dropdown menu. | |
* | |
* Copyright (c) 2012 Blake Haswell | |
* Licensed under the MIT license: http://opensource.org/licenses/MIT | |
* | |
* Example: | |
* var items = document.getElementById("dropdown").children; | |
* new Dropdown(items); |
module FileX | |
def self.mount?(path) | |
begin | |
stat_path = File.lstat(path) | |
rescue Errno | |
# It doesn't exist so not a mount point | |
return false | |
end | |
# A symlink can never be a mount point |
# src/{{app_name}}.cr | |
require "kemal" | |
require "./controllers/*" | |
alias Env = HTTP::Server::Context # this could be provided by Kemal | |
module Main | |
get "/", &->index(Env) | |
get "/:name", &->greet(Env) | |
end |