Skip to content

Instantly share code, notes, and snippets.

sudo nginx -t && sudo service nginx reload
/Applications/MAMP/Library/bin/mysqld --port=3306 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --skip-grant-tables
/Applications/MAMP/Library/bin/mysql --host=localhost -uroot -proot
git log --pretty=format:"%cn||%h||%cd||%s" --after="2014-1-1" --before="2015-8-30" > git_log.csv
@tylerkidd
tylerkidd / gist:a0c9e9ebe7102ebc447f
Created July 23, 2015 15:33
Ubuntu user creation/manipulation
sudo adduser username
sudo usermod -a -G groupname username
sudo usermod -d /var/www/[path to specific domain] username
@tylerkidd
tylerkidd / SCSS Mixins
Created May 7, 2015 20:39
SCSS Mixins
@mixin reset-styles(){
margin: 0;
padding: 0;
}
@mixin image-2x($image, $width, $height) {
@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
@tylerkidd
tylerkidd / gist:320e1b474a545d3628ce
Created April 24, 2015 17:17
Permissions and moving files
cp -R stage stage.live
chmod -R 777 workdir pdftemp logs
chmod -R 777 zf-cache silverstripe-cache
mv live live.{date}
mv stage.live live
if(session_id() == '') {
session_start();
}
if(isset($_GET['demo'])){
if($_GET['demo'] == 'on'){
$_SESSION['demo'] = 1;
}else{
unset($_SESSION['demo']);
}
<%--
<% cached SiteRevisionCacheID %>
<% if $DontIncludeSuperNav %>
<% else %>
<% with $DontIncludeSuperNav %>
<nav style="display:none!important;">
<% if not $software %><% include SoftwareSuperNav %><% end_if %>
<% if not $customer %><% include CustomerSuperNav %><% end_if %>
<% if not $resources %><% include ResourcesSuperNav %><% end_if %>
git config --global http.sslVerify false
@tylerkidd
tylerkidd / SilverStripe: Utilize x-cms-edit-link
Created September 12, 2013 16:19
SilverStripe: Utilize x-cms-edit-link