Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis Lins denislins

View GitHub Profile
@denislins
denislins / bug_report_template.rb
Created Jan 4, 2017
Bug report for amatsuda/kaminari#845
View bug_report_template.rb
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
# 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
<?php
class Teste
{
public function fazAlgumaCoisa()
{
echo __METHOD__, PHP_EOL;
}
@denislins
denislins / CSS PHP parser
Created Jul 18, 2013
Simple CSS PHP parser @todo improve it later
View CSS PHP parser
<?php
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.