⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
First of all you need to be able to run MAMP in port 80. This is a "heat check" if you don't have any process jamming http ports. You can check it like this:
sudo lsof | grep LISTEN
If you do happen to have any process with something like this *:http (LISTEN)
, you are in trouble. Before with adventure check if it isn't MAMP itself (yeah, you should close that beforehand)
ps <pid of that process>
If you don't see MAMP, you are in good hands, I have just the thing for 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
<?php /*?>* function csv_to_array | |
* @link http://gist.github.com/385876 | |
* @author Jay Williams <http://myd3.com/> | |
* @copyright Copyright (c) 2010, Jay Williams<?php */?> | |
<?php | |
$imagelist= $page->imagelist(); | |
if ($imagelist != ''){ | |
function csv_to_array($filename='', $delimiter=',') { |
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
<?php | |
class kirbytextExtended extends kirbytext { | |
function __construct($text, $markdown=true) { | |
parent::__construct($text, $markdown); | |
$this->addTags('figure'); |
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
everything i write on medium is a lie | |
xoxo j$ |
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
// Define gulp before we start | |
var gulp = require('gulp'); | |
// Define Sass and the autoprefixer | |
var sass = require('gulp-sass'); | |
var prefix = require('gulp-autoprefixer'); | |
// This is an object which defines paths for the styles. | |
// Can add paths for javascript or images for example | |
// The folder, files to look for and destination are all required for sass |
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 cheerio = require('gulp-cheerio'); | |
var svgmin = require('gulp-svgmin'); | |
var svgstore = require('gulp-svgstore'); | |
gulp.task('svgstore', function () { | |
return gulp | |
.src('assets/icons/*.svg') | |
.pipe(svgmin()) | |
.pipe(svgstore({ fileName: 'icons.svg', prefix: 'icon-' })) | |
.pipe(cheerio({ |
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
<script> | |
/* Put this in theme.liquid, preferably right before "</body>" */ | |
(function() { | |
var discountParam = document.location.search.match(/discount=(\w+)/); | |
if (discountParam && discountParam.length > 1) { | |
document.cookie = discountParam[0]; | |
} | |
})(); | |
</script> |