start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
<?php | |
require('../library/Solarium/Autoloader.php'); | |
Solarium_Autoloader::register(); | |
$client = new Solarium_Client(); | |
$client->setHost('192.168.1.2'); | |
$client->setCore('geonames'); | |
$query = new Solarium_Query_Select; |
<?php | |
/** | |
* @file | |
* Default theme implementation to display a block. | |
* | |
* Available variables: | |
* - $block->subject: Block title. | |
* - $content: Block content. | |
* - $block->module: Module that generated the block. |
I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.
I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...
#! /usr/bin/env bash | |
### | |
# | |
# install_mysql.sh | |
# | |
# This script assumes your Vagrantfile has been configured to map the root of | |
# your application to /vagrant and that your web root is the "public" folder | |
# (Laravel standard). Standard and error output is sent to | |
# /vagrant/vm_build.log during provisioning. |
YourTrelloKey
with this hash.YourTrelloToken
with this looong hash.// Since .woff has almost perfect support all the way back to IE9 except for Opera Mini, | |
// I removed the calls to .eot, .ttf and .svg. to streamline the mixin -- http://caniuse.com/#search=woff | |
// Note: IE8, IE7, IE6, old Safari in Android and iOS will gracefuly degrade to system fonts. | |
@mixin fontFace($font-family, $file-path) { | |
@font-face { | |
font: { | |
family: $font-family; | |
weight: normal; | |
style: normal; | |
} |
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
<?php | |
function json_response($code = 200, $message = null) | |
{ | |
// clear the old headers | |
header_remove(); | |
// set the actual code | |
http_response_code($code); | |
// set the header to make sure cache is forced | |
header("Cache-Control: no-transform,public,max-age=300,s-maxage=900"); |