Skip to content

Instantly share code, notes, and snippets.

Felipe Lavín Z. felipelavinz

View GitHub Profile
View map-style.json
[
{
"elementType": "labels",
"stylers": [
{
"visibility": "off"
}
]
},
{
View gist:16f6131e94819f25a9032a721af271f0
function base64ToBits( $validFor ) {
if ( empty( $validFor ) ) {
return '';
}
$validForBits = '';
$validForArr = str_split( $validFor );
$base64Chars = str_split('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/');
for ( $i = 0; $i < count( $validForArr ); $i++ ) {
$thisChar = $validForArr[ $i ];
$val = array_search( $thisChar, $base64Chars );
View lighttpd.conf
$HTTP["host"] =~ "sitios.ucsc.cl|www.sitios.ucsc.cl|admision.ucsc.cl|www.admision.ucsc.cl|fscu.ucsc.cl|rinie.ucsc.cl|foobar.ucsc.cl" {
# Configuraciónes Basicas
server.document-root = "/var/www/ucsc-minisitios/htdocs"
server.error-handler-404 = "/index.php?error=404"
$HTTP["url"] =~ "^/xmlrpc.php" {
url.access-deny = ( "" )
server.error-handler-404 = "/403.php"
}
View results.json
{
"dimensions": [{
"id": 1,
"label": "Autonom\u00eda",
"values": [6, 1, 1, 1, 1, 2, 6, 1, 2, 3, 3, 3],
"indicators": [2, 3, 4, 1],
"score": 30,
"answered": 12,
"max": 72,
"min": 12,
@felipelavinz
felipelavinz / lighttpd.conf
Created Mar 22, 2018
Mitigación de CVE-2018-6389 para WordPress con lighttpd
View lighttpd.conf
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
"mod_rewrite",
"mod_accesslog",
"mod_evasive"
)
View webpack.config.js
// webpack.config.js
var Encore = require('@symfony/webpack-encore');
var LiveReloadPlugin = require('webpack-livereload-plugin');
Encore
// directory where all compiled assets will be stored
.setOutputPath('dist/')
// what's the public path to this directory (relative to your project's document root dir)
.setPublicPath('/dist')
View wordpress-multisite-lighttpd.conf
$HTTP["host"] =~ "www.domain.com|domain.com" {
# Configuraciónes Basicas
server.document-root = "/var/www/htdocs"
server.error-handler-404 = "/index.php?error=404"
$HTTP["url"] =~ "^/xmlrpc.php" {
url.access-deny = ( "" )
server.error-handler-404 = "/403.php"
}
View sitios.ucsc.cl.conf
$HTTP["host"] =~ "sitios.ucsc.cl|www.sitios.ucsc.cl" {
# Configuraciónes Basicas
server.document-root = "/var/www/htdocs"
server.error-handler-404 = "/index.php?error=404"
$HTTP["url"] =~ "^/xmlrpc.php" {
url.access-deny = ( "" )
server.error-handler-404 = "/403.php"
}
@felipelavinz
felipelavinz / global--restrictions.conf
Created Aug 3, 2017
Configuraciones nginx para WordPress
View global--restrictions.conf
# Global restrictions configuration file.
# Designed to be included in any server {} block.</p>
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
View authsources.php
<?php
$config = array(
/* This is the name of this authentication source, and will be used to access it later. */
'udd-sp' => array(
'saml:SP',
'privatekey' => 'saml.pem',
'certificate' => 'saml.crt',
'idp' => 'http://auth-beta.udd.cl/www/saml2/idp/metadata.php',
'entityID' => 'icono.sitios.udd.cl',
You can’t perform that action at this time.