Skip to content

Instantly share code, notes, and snippets.

@1stevengrant
1stevengrant / .htaccess
Created May 24, 2014 14:18
htaccess that can protect an environment
#
# .htaccess
# Apache Configuration File
#
# This code has been assembed from various places. A LOT of it came from
# the HTML boilerplate. See their awesome stuff here: http://html5boilerplate.com/
#
# Created by Jesse Bunch on 2011-04-15.
# Copyright 2011 Jesse Bunch (www.GetBunch.com). All rights reserved.
#
@johnmeilleur
johnmeilleur / Install-Statamic.sh
Last active August 29, 2015 14:13
Install Statamic
# Update Ubuntu with the latest updates
sudo apt-get update
# Install Apache
sudo apt-get --yes install apache2
# Enable mod_rewrite and mod_headers Apache modules
sudo a2enmod rewrite
sudo a2enmod headers
@jasonvarga
jasonvarga / _readme.md
Last active August 29, 2015 14:23
Restricting an account to specific sections in the CP

Simple Statamic CP edit restrictions

  • Add the hooks file to _add-ons/restrict_to/hooks.restrict_to.php.
  • Add the restrict_to tags field to your _config/bundles/member/fields.yaml.
  • To restrict pages, add them to the restrict_to field. eg. /blog, /calendar. They will only be allowed to edit pages that begin with this url.

Warning

If your member listing is visible, (it is by default), they can edit their own restricted pages.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>font-name-aliases</key>
<dict>
<!-- N.B. 'system-font' is also available as an alias; it will be mapped to the actual system font at runtime. -->
<key>light</key>
<string>.SFNSText-Light</string>
<key>light-italic</key>
@wihodges
wihodges / gist:8478326
Created January 17, 2014 18:03
Foundation 5 + Statamic Theme Gruntfile
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
options: {
includePaths: ['bower_components/foundation/scss']
},
dist: {
options: {
@zachmayberry
zachmayberry / parallax.js
Last active January 4, 2016 08:11
Parallax scroll event optimization for changing background images and not disrupting the fluid scroll
/*
Used in conjunction with Scott Robin's backstretch script:
https://github.com/srobbin/jquery-backstretch
*/
(function($) {
var justExecuted = false;
$(window).on('scroll', function() {
@jasonvarga
jasonvarga / Gruntfile.js
Last active January 4, 2016 15:19
Using Grunt to copy Statamic add-on files to a sandbox site
module.exports = function(grunt) {
grunt.initConfig({
concat: {
// js stuff
},
uglify: {
// more js stuff
@jtomaszewski
jtomaszewski / multi_column_clearance.sass
Created January 31, 2014 12:34
Bootstrap 3 Grid Multi Column Clearing
// See issue https://github.com/twbs/bootstrap/issues/8810 for more information.
//
// Thanks for the idea of the fix to:
// https://github.com/sixfootsixdesigns/Bootstrap-3-Grid-Columns-Clearing
@import "bootstrap/variables"
// Useful @media mixins (based on dimensions taken from bootstrap-sass)
=media-width-below($max)
@vmbrasseur
vmbrasseur / negotiation.markdown
Last active April 24, 2018 17:20
Negotiation Articles/Resources
@jcohlmeyer
jcohlmeyer / statamic.md
Last active August 15, 2018 23:53
Statamic DO

SSH config (on your local machine)

Host [name]
  HostName [floating_ip]
  User root
  IdentityFile ~/.ssh/[ssh_key]
  IdentitiesOnly yes

Update software