Skip to content

Instantly share code, notes, and snippets.

@josefglatz
josefglatz / PageLayoutViewDrawItem.php
Created November 8, 2014 12:29
TYPO3CMS tt_content_drawItem hook example (TYPOCMS 6.2)
<?php
namespace J18\J18thmsimkup\Hooks;
/***************************************************************
* Copyright notice
*
* (c) 2014 GLATZ, Josef <jousch@gmail.com>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
@cedmax
cedmax / LICENSE.txt
Last active September 25, 2015 23:08 — forked from 140bytes/LICENSE.txt
pub/sub custom events
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 cedmax <http://github.com/cedmax>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@oalders
oalders / graphicsmagick.rb
Created November 10, 2011 18:54
install Graphics::Magick via homebrew
require 'formula'
def ghostscript_fonts?
File.directory? "#{HOMEBREW_PREFIX}/share/ghostscript/fonts"
end
def ghostscript_srsly?
ARGV.include? '--with-ghostscript'
end
@rowild
rowild / css_image_replacement_expl.css
Last active December 16, 2015 23:49
CSS: Image Replacement
/* Text hiding without indent */
.ir {
border: 0;
font: 0/0 a;
text-shadow:none;
color: transparent;
background-color: transparent;
}
{namespace cr = Tx_Catalogueraisonee_ViewHelpers}
<f:if condition="{entries}">
<f:then>
<f:for each="{entries}" as="entry" iteration="iterator">
<cr:alphabet string="{entry.title}" length="1" />
<f:if condition="{iterator.isFirst}">
<?php
/***************************************************************
* Copyright notice
*
* (c) 2012 Torsten Schrade <Torsten.Schrade@adwmainz.de>
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
@dmitryd
dmitryd / checkboxes.txt
Created July 10, 2013 08:16
This example shows how to use the 'split' TypoScript function to create a set of checkboxes easily. There are three files total: general code, stdWrap helper and usage example.
temp.checkbox_with_split = COA
temp.checkbox_with_split {
# Define data
10 = LOAD_REGISTER
10 {
# Valid bits in the field
bits = 1,2,3,4,5,6,7
# Field name in the database. Don't move below other registers!
@davemo
davemo / .gitconfig
Last active April 12, 2016 14:45
Git Config
[user]
name = David Mosher
email = davidmosher@gmail.com
[core]
autocrlf = input
safecrlf = false
editor = vim
excludesFile = /Users/davidmosher/.gitignore_global
[github]
user = davemo
@fat
fat / gist:956180
Created May 4, 2011 22:28
better contains
var ALEX = ['foo', 'bar'];
//n00bs write:
if (ALEX.indexOf('foo') > -1) {
//ALEX contains foo
}
//pros write:
if (~ALEX.indexOf('foo')) {
//ALEX contains foo
// create the audio context (chrome only for now)
var context = new webkitAudioContext();
var audioBuffer;
var sourceNode;
var analyser;
var javascriptNode;
// get the context from the canvas to draw on
var ctx = $("#canvas").get()[0].getContext("2d");