Skip to content

Instantly share code, notes, and snippets.

View kbzone's full-sized avatar
🖱️

Cabello, Hector Guillermo kbzone

🖱️
View GitHub Profile
@hubgit
hubgit / html-purifier-strict.php
Created August 18, 2010 15:21
strict purification of HTML using HTMLPurifier
<?php
$url = 'http://en.wikipedia.org/wiki/1,1,1-Trichloroethane'; // example
$config = HTMLPurifier_Config::createDefault();
$config->set('URI.Base', $url); // set the base URL (overrides a <base element in the HTML head?)
$config->set('URI.MakeAbsolute', true); // make all URLs absolute using the base URL set above
$config->set('AutoFormat.RemoveEmpty', true); // remove empty elements
$config->set('HTML.Doctype', 'XHTML 1.0 Strict'); // valid XML output (?)
$config->set('HTML.AllowedElements', array('p', 'div', 'a', 'br', 'table', 'thead', 'tbody', 'tr', 'th', 'td', 'ul', 'ol', 'li', 'b', 'i'));
/*
* ------------------------------------------------------------
* "THE BEERWARE LICENSE" (Revision 42):
* <author> wrote this code. As long as you retain this
* notice, you can do whatever you want with this stuff. If we
* meet someday, and you think this stuff is worth it, you can
* buy me a beer in return.
* ------------------------------------------------------------
*/
@subfuzion
subfuzion / gist:1128192
Created August 5, 2011 18:37
Git Tips: Reset, Clean - Remove untracked files and directories from the working tree when switching branches or checking out different commits.
git reset --hard
git clean -f -d
Description:
============
Git Tips: Remove untracked files and directories from the working
tree when switching branches or checking out different commits.
Explanation:
@ctrl-freak
ctrl-freak / html-purifier-config.php
Created September 2, 2011 08:02
HTML Purifier Configuration
<?
$purifier_config = HTMLPurifier_Config::createDefault();
$purifier_config->set('HTML.AllowedElements', 'p, a, ul, ol, li, h1, h2, h3, h4, h5, h6, br, strong, em, b, i');
$purifier_config->set('HTML.AllowedAttributes', '');
$purifier_config->set('CSS.AllowedProperties', '');
$purifier_config->set('AutoFormat.RemoveEmpty', true);
$purifier_config->set('AutoFormat.AutoParagraph', true);
// May cause problems with empty table cells and headers
@dcorns
dcorns / FedoraWebDevSetup
Last active March 13, 2023 14:01
One way to setup Fedora distro for Web Development
Fedora Setup Notes
1) If you did not make yourself an administrator during the install, Add yourself to etc/sudoers using the command visudo (allows user to authenticate own account for operations requiring root).
a) su, enter root password when prompted
b) visudo (use vi for sudo to edit the file following instructions in the file; either add self as a sudo user or enable a group for sudo user and add your self to that group using user group commands)
c) ctrl-D (exit root access)
d) logout and log back in or restart
e) Now you should be able to respond to any prompt requiring root with your own login credentials and be able to run commands using sudo with your own credentials.
2) Google Chrome Setup
@addyosmani
addyosmani / README.md
Last active October 2, 2025 12:05 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@ssebastianj
ssebastianj / api.md
Last active November 13, 2018 04:25
¿Cuándo Pasa Resistencia? API Reverse Engineering

¿Cuándo Pasa Resistencia?

API

1. Identificador de usuario

El identificador de usuario userId a utilizar en las peticiones está en función del tipo de línea de colectivo que se desea consultar (urbana o interurbana).

Línea UserId
Urbana 0d7c6b60-7b7f-4833-ace7-e633dc1a33c9
Interurbana 30d72c97-568b-4dcb-b239-13c0a318348c
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@noelboss
noelboss / git-deployment.md
Last active August 12, 2025 18:16
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.