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
func createHtmlLink(linkTitle title: String = "Click Me", href: String = "#", #titleFormatter: (String) -> String) -> String | |
{ | |
return "<a href=\"\(href)\">\(titleFormatter(title))</a>" | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am mikedugan on github. | |
* I am mikedugan (https://keybase.io/mikedugan) on keybase. | |
* I have a public key whose fingerprint is 2CDF DFD0 1DFA ED69 2090 1A9C 4570 22C0 A4FF C8DF | |
To claim this, I am signing this object: |
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
alias docksep=docksep | |
docksep() { | |
defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' | |
killall Dock | |
} |
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
// This is what you might have right now | |
Route::get('users/{id}', 'UserController@getProfile')->where('id', '[\d+]+'); | |
Route::get('products/{id}', 'ProductController@getProfile')->where('id', '[\d+]+'); | |
Route::get('articles/{slug}', 'ArticleController@getFull')->where('slug', '[a-z0-9-]+'); | |
Route::get('faq/{slug}', 'FaqController@getQuestion')->where('slug', '[a-z0-9-]+'); | |
// and many more, now imagine you'll have to change the rule | |
// Instead, you could have a handy list of patterns and reuse them everywhere: | |
// Patterns | |
Route::pattern('id', '\d+'); |
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
/*! | |
* | |
* All glyphicons must be licensed for use according to http://glyphicons.com/license/ | |
* This file does not include any fonts or other assets and is only for developers who have purchased Glyphicons | |
* | |
* License: MIT | |
* | |
*/ | |
// IMPORT FONTS |
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 gulp = require('gulp'); | |
var rimraf = require('rimraf'); | |
var less = require('gulp-less'); | |
var concat = require('gulp-concat'); | |
var prefixer = require('gulp-autoprefixer'); | |
var cssmin = require('gulp-minify-css'); | |
var jsmin = require('gulp-uglify'); | |
var watch = require('gulp-watch'); | |
var util = require('gulp-util'); | |
var rename = require('gulp-rename'); |
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/python | |
#obviously, this requires python to be installed | |
#sudo chmod +x free.py && sudo mv free.py /usr/bin/free | |
#allows you to access it as a regular command | |
import subprocess | |
import re | |
# Get process info |
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
server { | |
listen 80; | |
server_name YOUR_DOMAIN; | |
server_name_in_redirect off; | |
access_log /var/log/nginx/localhost.access_log main; | |
error_log /var/log/nginx/localhost.error_log info; | |
root PATH_ON_SERVER; | |
index index.php index.html index.htm default.html default.htm; |
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
This Document | |
Assumes you have a basic knowledge of emmet-style coding, it was used to abbreviate much of this. Any time you see a pipe(|), it is indicating you can select one of a group of elemnts. Any time you see a ? preceding something, it means it is optional. | |
CS=(success|info|warning|danger) | |
CL=(primary|default|CS) | |
SZ=(lg|sm|xs) | |
All information retrieved from: | |
http://getbootstrap.com/ |
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
#!/bin/bash | |
yum update -y | |
wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm | |
rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm | |
yum --enablerepo=remi,remi-php55 install -y mysql mysql-server php httpd php-mbstring php-mysql php-gd php-mcrypt curl php-xml php-xmlrpc php-cli | |
chkconfig --levels 235 mysqld on | |
chkconfig --levels 235 httpd on | |
/etc/init.d/mysqld start |
NewerOlder