Skip to content

Instantly share code, notes, and snippets.

View thedamon's full-sized avatar

Damon Muma thedamon

View GitHub Profile
@gavinblair
gavinblair / errors.php
Created May 4, 2012 20:05
Error Reporting: I'm always trying to remember how to do this
<?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
@zoster
zoster / Error Log Debugging
Created April 28, 2013 19:29
Debugging with an error log
//setup
error_reporting(E_ALL);
ini_set('error_log','error.log');
//use
error_log($variable);
error_log("\n".var_export($message, true));
@jmartsch
jmartsch / Gruntfile.coffee
Last active July 15, 2016 12:10
Gruntfile with browser-sync and assemble for static html files
# Generated on 2013-10-28 using generator-bootstrap-less 3.0.3
"use strict"
#lrSnippet = require("grunt-contrib-livereload/lib/utils").livereloadSnippet
#mountFolder = (connect, dir) ->
# connect.static require("path").resolve(dir)
# # Globbing
# for performance reasons we're only matching one level down:
# 'test/spec/{,*/}*.js'
@gilbarbara
gilbarbara / .eslintrc
Last active December 31, 2016 21:37
.eslintrc configuration file for ES2015 + react
{
"parser": "babel-eslint",
"ecmaFeatures": {
"modules": true,
"experimentalObjectRestSpread": true
},
"env": {
"amd": true,
"browser": true,
"es6": true,
@gisu
gisu / _cssgrid.scss
Last active May 7, 2020 17:51
For converting Grid Spec 2 to Grid Spec 1
// ===================================================
// CSS Grid Layout Helper
//
// To convert some of the CSS Grid Spec 2 features to Spec 1
//
// Author: Sascha Fuchs
//
// ===================================================
/// Add Gap between the boxes
@dazld
dazld / component.txt
Last active June 20, 2021 16:37
AEM Sightly JS globals, currentPage investigations
accessible
adaptTo
analyzable
cellName
childEditConfig
class
componentGroup
container
declaredChildEditConfig
declaredEditConfig
@JesseObrien
JesseObrien / gist:7418983
Last active January 31, 2024 06:24
Bind parameters into the SQL query for Laravel ORM
<?php
class MyModel extends Eloquent {
public function getSql()
{
$builder = $this->getBuilder();
$sql = $builder->toSql();
foreach($builder->getBindings() as $binding)
{
@robmiller
robmiller / .gitconfig
Created July 17, 2013 07:52
Some useful Git aliases that I use every day
#
# Working with branches
#
# Get the current branch name (not so useful in itself, but used in
# other aliases)
branch-name = "!git rev-parse --abbrev-ref HEAD"
# Push the current branch to the remote "origin", and set it to track
# the upstream branch
publish = "!git push -u origin $(git branch-name)"
@floriankraft
floriankraft / JcrQueryLibrary.md
Last active March 26, 2024 15:20
Some useful JCR queries (XPATH, SQL2) for AEM/CQ development.

SQL2

All nodes with a specific name

SELECT * FROM [nt:unstructured] AS node
WHERE ISDESCENDANTNODE(node, "/search/in/path")
AND NAME() = "nodeName"

All pages below content path