Skip to content

Instantly share code, notes, and snippets.

View leek's full-sized avatar

Chris Jones leek

View GitHub Profile
<?php
App::after(function($request, $response)
{
/**
* HTML Minification
* https://gist.github.com/zmsaunders/5619519
* https://gist.github.com/garagesocial/6059962
*/
if (Config::get('project.minify.html', false) !== false)
@Samnan
Samnan / rounded_corners_table.sass
Created June 25, 2011 06:57 — forked from solnic/rounded_corners_table.sass
Here's how to do a table with rounded corners in CSS3
@import compass/reset
@import compass/css3/border-radius
table
border: none
border-collapse: separate
th, td
padding: 5px
thead
background-color: #f2f6fa
@rudylattae
rudylattae / Jaxy.js
Created August 6, 2011 08:09
Zyx.js -- a collection of microjs helpers
var Jaxy = function() {
this.xhr = new XMLHttpRequest;
};
Jaxy.prototype.get = function(options) {
if (typeof options.url === 'undefined') return;
var self = this;
var url = options.url || '';
var success = options.success || null;
var error = options.error || null;
@manuhabitela
manuhabitela / bootstrap-breakpoint-indicator-bookmarklet.js
Last active December 2, 2015 07:52
Bookmarklet showing current bootstrap breakpoint at the top left of the page
(function(){
var script = document.createElement("script");
script.src = "https://rawgit.com/Leimi/122905f66682fb3c4927/raw/source.js";
document.getElementsByTagName("head")[0].appendChild(script);
})();
@mouton-rebelle
mouton-rebelle / gulpfile.js
Created January 15, 2014 10:56
Working gulpfile with compass & livereload (workaround for compass issue not streaming modified files)
/* global require */
var lr = require('tiny-lr'),
gulp = require('gulp'),
compass = require('gulp-compass'),
livereload = require('gulp-livereload'),
server = lr();
gulp.task('compass', function() {
gulp.src('./sass/*.scss')
.pipe(compass({
@jwage
jwage / Doctrine MongoDB ODM Tail Cursor Command Daemon
Created February 6, 2011 00:01
This is a Symfony2 Doctrine MongoDB ODM Tail Cursor console command. It can be ran as a daemon and it will tail a mongodb collection with a tailable cursor and process the documents with a given service as the "processor". You must specify the document, t
<?php
namespace MyCompany\Bundle\MyBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpFoundation\Request;
@molotovbliss
molotovbliss / logrotate
Last active April 26, 2021 17:33
Magento Log Rotate with logrotate
The magento-logrotate.conf file contents:
/path/to/magento/var/log/*log {
rotate 7
daily
compress
missingok
notifempty
copytruncate
create 660 www-data www-data
@shakdaniel
shakdaniel / gulpfile.js
Last active September 17, 2021 02:48
Gulpfile for my workflow.
// npm install --save-dev gulp gulp-jade gulp-stylus gulp-autoprefixer gulp-minify-css gulp-jshint jshint-stylish gulp-uglify gulp-concat gulp-imagemin imagemin-pngcrush gulp-rename gulp-clean gulp-newer gulp-filesize gulp-size gulp-notify browser-sync
// GULP DEPENDENCIES & PLUGINS
var gulp = require('gulp'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
prefix = require('gulp-autoprefixer'),
mincss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),

Includes:

  • Configuration
  • BrowserSync
  • Environments (e.g.,: --environment=production)
  • Image optimization (gif, jpg, png, and svg)
  • Sass compilation with external libraries
  • Bower installed Sass libraries example(s)
  • CSS processing with Pleeease
@astorm
astorm / gist:992233
Created May 25, 2011 23:29
Fix console.log in Chrome and Magento
<!-- Add to the package layout (via local.xml or however you prefer) -->
<!-- Also, best to remove before deployment, as some users report -->
<!-- it makes IE 7 crash -->
<default>
<reference name="content">
<block type="core/text" name="fix.console" as="fix.console">
<action method="setText">
<text><![CDATA[<script type="text/javascript">
iframe = document.createElement('iframe');
iframe.style.display = 'none';