Skip to content

Instantly share code, notes, and snippets.


Denis Lins denislins

View GitHub Profile
denislins / bug_report_template.rb
Created Jan 4, 2017
Bug report for amatsuda/kaminari#845
View bug_report_template.rb
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
gemfile(true) do
source ""
# Activate the gem you are reporting the issue against.
View extend.js
define(function() {
'use strict';
return {
create: function(callback) {
return this.mount(function() {}, callback);
mount: function(baseClass, callback) {
View gist:6378575
class Teste
public function fazAlgumaCoisa()
echo __METHOD__, PHP_EOL;
denislins / CSS PHP parser
Created Jul 18, 2013
Simple CSS PHP parser @todo improve it later
View CSS PHP parser
header('Content-type: text/plain');
function CompressCSS($css) {
$css = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $css); // Remover comentarios
$css = preg_replace('#(\r|\n|\t)#', '', $css); // Remover Tabs e NewLines
$css = preg_replace('#[ ]*([,:;\{\}])[ ]*#', '$1', $css);// Remover caracteres com espaços extras
$css = strtr($css, array(';}' => '}')); // Extras
return $css;
You can’t perform that action at this time.