Use xip.io with a home-grown Apache VirtualHost setup
- Start here.
- Add a
ServerAlias
line to your VirtualHost definitions.
<VirtualHost *:80>
DocumentRoot "/Users/you/Sites/sitename"
ServerAlias sitename.*.xip.io
ServerName sitename.dev
databaseadmin: | |
image: phpmyadmin/phpmyadmin | |
environment: | |
PMA_HOST: some-mysql | |
links: | |
- mysqlserver | |
ports: | |
- "8080:80" | |
mysqlserver: | |
image: mysql |
ServerAlias
line to your VirtualHost definitions.<VirtualHost *:80>
DocumentRoot "/Users/you/Sites/sitename"
ServerAlias sitename.*.xip.io
ServerName sitename.dev
// An intersting pattern for testing, but you can use the check anywhere | |
import "testing" | |
func TestCheckingChannel(t *testing.T) { | |
stop := make(chan bool) | |
// Testing some fucntion that SHOULD close the channel | |
func (stop chan bool) { | |
close(chan) | |
}(stop) |
type Post struct { | |
// db tag lets you specify the column name if it differs from the struct field | |
Id int64 `db:"post_id"` | |
Created int64 | |
Title string `form:"Title" binding:"required"` | |
Body string `form:"Body"` | |
UserId int64 `form:"UserId"` | |
Url string | |
} |
# Goto a directory you can write to: | |
cd ~ | |
#get composer: | |
curl -s https://getcomposer.org/installer | php | |
# move composer into a bin directory you control: | |
sudo mv composer.phar /usr/local/bin/composer | |
# double check composer works | |
composer about |
void function(){ | |
"use strict" | |
/* | |
* Manage and Import / Export snippets from chrome (2016) | |
* hacked together by: http://github.com/soundyogi | |
* inspired by: https://github.com/bgrins/devtools-snippets/blob/master/import-export/chrome/devtools_import_export.js | |
* ALPHA / SILLY SIDE PROJECT | |
*/ | |
.container { | |
height: 500px; | |
border: 2px solid grey; | |
position:relative; | |
} | |
.split { | |
display: flex; | |
height: 100%; | |
border: 1px solid black; |
<?php | |
/************************************************************************* | |
* Get File Information | |
*/ | |
// Assuming these come from some data source in your app | |
$s3FileKey = 's3/key/path/to/file.ext'; | |
$fileName = 'file.ext'; |
Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)
This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.