Skip to content

Instantly share code, notes, and snippets.

View uzielweb's full-sized avatar

Uziel Almeida Oliveira uzielweb

View GitHub Profile
@uzielweb
uzielweb / .htaccess
Created March 9, 2021 15:12 — forked from drakakisgeo/.htaccess
Joomla .htaccess for extra security
###############################################################################
## The Master .htaccess
##
## Version 2.5 (proposed) - May 16th, 2011
##
## ----------
## This file is designed to be the template .htaccess file to put on your new
## sites, increasing your site's security and performance. It is not meant to
## be just dropped in your site, though. You should go through all of its
## sections and modify it to match your site. Most notably, all instances of
@uzielweb
uzielweb / sources.list
Last active November 11, 2019 18:46 — forked from aristidesneto/source.list
Source List - Debian 9 Stretch
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://deb.debian.org/debian/ stable main contrib non-free
deb-src http://deb.debian.org/debian/ stable main contrib non-free
deb http://deb.debian.org/debian/ stable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free
<?php
function replace_scripts_with_src( $html ) {
$html = preg_replace( '`\<script\b[^\x3e]*\bsrc\b[\x00-\x20\x7f]*\=[\x00-\x20\x7f]*(?:[\x22](?:[^\x22]*)[\x22]|[\x27](?:[^\x27]*)[\x27]|[^\x20\x3e]*)[^\x3c]*(?:(?!\<\/script\>)\<[^\x3c]*)*\<\/script\>`i', '', $html );
return $html;
}
$old_html = file_get_contents( 'https://www.facebook.com' );
$new_html = replace_scripts_with_src( $old_html );
@uzielweb
uzielweb / jquery.equalHeights.js
Created August 22, 2017 19:41 — forked from davetayls/jquery.equalHeights.js
Equal heights reloaded with window resize
/**
 * Equal Heights Plugin
 * Equalize the heights of elements. Great for columns or any elements
 * that need to be the same size (floats, etc).
 *
 * Version 1.0
 * Updated 12/10/2008
 *
 * Copyright (c) 2008 Rob Glazebrook (cssnewbie.com)
 *
@uzielweb
uzielweb / gist:b26bf0227a1cb8c3f66a7c6e7341bc0a
Created March 3, 2017 23:11 — forked from marksteve/gist:877210
Monokai Notepad2 Color Scheme
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc; diz; nfo
Default Style=font:Consolas; size:10; fore:#F8F8F2; back:#272822
Margins and Line Numbers=size:-2; fore:#BCBCBC; back:#3B3A32
Matching Braces=size:+1; bold; fore:#000000; back:#FD971F
Matching Braces Error=size:+1; bold; fore:#F8F8F0; back:#F92672
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#A0A0A0
Selected Text (Colors)=fore:#F8F8F2; back:#49483E; eolfilled
Whitespace (Colors, Size 0-5)=
@uzielweb
uzielweb / chmoder.php
Last active October 6, 2016 02:59 — forked from anonymous/chmoder.php
CHMODER is a little script to chmod in a batch mode all files and directories recursively. How to use: upload to a server and run it via url. http://yoursite.etc/chmoder.php
<?
header('Content-Type: text/plain');
/**
* Changes permissions on files and directories within $dir and dives recursively
* into found subdirectories.
*/
function chmod_r($dir)
{
@uzielweb
uzielweb / gist:e2491197acf833f8a0747a342b80589c
Created August 16, 2016 05:22 — forked from xCONFLiCTiONx/Notepad2.ini
Notepad2.ini Visual Studio Dark Theme (Color Scheme Only)
[Custom Colors]
01=#000000
02=#0A246A
03=#3A6EA5
04=#52A5F8
05=#0D8206
06=#608020
07=#648000
08=#A46000
09=#54EDBF
@uzielweb
uzielweb / notepad2-solarized.ini
Created August 16, 2016 05:14 — forked from gene-pavlovsky/notepad2-solarized.ini
Solarized Dark and Light color schemes for Notepad2-mod
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc; diz; nfo
Default Style=font:Consolas; size:11; fore:#93a1a1; back:#002b36
Margins and Line Numbers=size:-1; fore:#657b83; back:#073642
Matching Braces=size:+1; bold; fore:#dc322f; back:#073642
Matching Braces Error=size:+1; underline; fore:#dc322f; back:#073642
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#073642
Selected Text (Colors)=eolfilled; fore:#eee8d5; back:#586e75
Whitespace (Colors, Size 0-5)=fore:#d33682
[Default Text]
FileNameExtensions=txt; text; wtx; log; asc; doc
Default Style=font:Helvetica; size:11; fore:#DDDDDD; back:#222222
Margins and Line Numbers=size:-3; fore:#AAAAAA; back:#444444
Matching Braces=size:+1; bold; fore:#FF0000
Matching Braces Error=size:+1; bold; fore:#000080
Control Characters (Font)=size:-1
Indentation Guide (Color)=fore:#A0A0A0
Selected Text (Colors)=back:#144AD8; eolfilled; alpha:95
Whitespace (Colors, Size 0-5)=fore:#FF4000
@uzielweb
uzielweb / 0_reuse_code.js
Created April 17, 2014 20:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console