Skip to content

Instantly share code, notes, and snippets.

@marcj
marcj / do-it.sh
Last active April 12, 2020 08:47
OSX PhpStorm, better performance - more FPS using OpenGL
cp /Applications/PhpStorm.app/Contents/bin/phpstorm.vmoptions ~/Library/Preferences/WebIde*
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions
@jonathanpath
jonathanpath / _z-index.scss
Last active June 23, 2018 10:51
Z-index Sass scale
// ----------------------
// == Z-index scale (inspired by https://gist.github.com/fat/1f6da6b3bd0311a1f8a0)
// ----------------------
// Z-Index Scale (private vars)
// --------------------------------------------------
$zindex-1: 100;
$zindex-2: 200;
$zindex-3: 300;
$zindex-4: 400;
@himynameisdave
himynameisdave / gradient-animation.less
Last active May 23, 2023 01:45
Mixins for Animating Between Gradients
.gradient-animation( @start, @end, @transTime ){
background-size: 100%;
background-image: linear-gradient(@start, @end);
position: relative;
z-index: 100;
&:before {
background-image: linear-gradient(@end, @start);
content: '';
display: block;
height: 100%;
@oliverthiele
oliverthiele / LocalConfiguration.php
Created December 11, 2014 13:12
Redis Configuration in TYPO3
<?php
return array(
// ...
'SYS' => array(
'caching' => array(
'cacheConfigurations' => array(
'cf_cache_hash' => array(
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend',
'options' => array(
'database' => 10,
@lambdalisue
lambdalisue / install_gui_application_darwin.sh
Created November 13, 2014 17:35
Install Mac OS X Gui Application via Homebrew Cask
#!/usr/bin/env bash
#==============================================================================
# Install Mac OS X GUI Application via brew cask
#==============================================================================
brew cask install google-chrome
brew cask install thunderbird
brew cask install dropbox
brew cask install copy
brew cask install slack
brew cask install the-unarchiver
@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
@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",
@joshcarr
joshcarr / soundwaves.js
Created May 1, 2014 23:16
Creating sound waves with JavaScript
// Creating sound waves with JavaScript
// from http://js.do/blog/sound-waves-with-javascript/
var samples = []
//
//
//
// Achord
@jasny
jasny / bootstrap-em.less
Last active January 5, 2020 15:36
Use em or rem font-size in Bootstrap 3
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em
@fregante
fregante / TimelineLite.addDelay.js
Last active December 24, 2018 11:53
Method to add delays at any position in Greensocks TimelineLite and TimelineMax (Javascript GSAP)
/**
* Add a delay at the end of the timeline (or at any label)
* @param {number} delay Seconds to wait
* @param {string} position Label name where to start the delay
*
* Usage: tl.addDelay(4); //easy!
*/
TimelineLite.prototype.addDelay = function (delay, position) {
var delayAttr;
if(typeof delay === 'undefined' || isNaN(delay)){