Skip to content

Instantly share code, notes, and snippets.

View heanfig's full-sized avatar

Herman Andres Figueroa heanfig

View GitHub Profile
@heanfig
heanfig / SassMeister-input.scss
Created October 23, 2018 05:21 — forked from pdaoust/SassMeister-input.scss
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// 'map', 'transform', 'select', or 'project' function. Iterate over a list,
// performing a function on each item, and collecting the new items. Each
// function takes an item as a first argument and returns a transformed item.
// You can pass additional arguments to the function too, which is a decent poor
// man's function composition.
Organization name: [email protected]
Serial Key: eNrzzU/OLi0odswsqslJTa3IzHJIz03MzNFLzs+tMTQyNrcwsTQyAIEa5xpDAIFxDy8k
/**
* @internal never define functions inside callbacks.
* these functions could be run multiple times; this would result in a fatal error.
*/
/**
* custom option and settings
*/
function wporg_settings_init() {
// register a new setting for "wporg" page
<?php
$dominio = 'Area restringida';
// usuario => contraseña
$usuarios = array('admin' => 'micontraseña', 'invitado' => 'invitado');
if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
header('HTTP/1.1 401 Unauthorized');
header('WWW-Authenticate: Digest realm="'.$dominio.
var $routeControllers= "includes/controllers.php";
var $routeControlleri= "includes/controlleri.php";
var $routeControlleru= "includes/controlleru.php";
var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider,$httpProvider) {
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';
@heanfig
heanfig / app.js
Created March 27, 2018 01:52
ajax http
app.config(function($httpProvider) {
/**
* The workhorse; converts an object to x-www-form-urlencoded serialization.
* @param {Object} obj
* @return {String}
*/
var param = function (obj) {
var query = '', name, value, fullSubName, subName, subValue, innerObj, i;
@heanfig
heanfig / xampp_php7_xdebug.md
Created March 12, 2018 23:23 — forked from odan/xampp_php7_xdebug.md
Installing Xdebug for XAMPP

Installing Xdebug for XAMPP with PHP 7.x

Requirements

Setup

@heanfig
heanfig / foo.js
Created February 18, 2018 17:50 — forked from vvgomes/foo.js
Ramda vs Lodash
var _ = require("lodash");
var R = require("ramda");
var companies = [
{ name: "tw", since: 1993 },
{ name: "pucrs", since: 1930 },
{ name: "tw br", since: 2009 }
];
var r1 = _(companies).chain()
<?php
// This variable value is passed to our function
$bookable_total = 1;
function woo_add_cart_fee( $bookable_total = 0 ) {
//global $bookable_total;
/*if ( is_admin() && ! defined( 'DOING_AJAX' ) )
return;*/
@heanfig
heanfig / fibonacci-generator.js
Created October 24, 2017 03:30 — forked from jfairbank/fibonacci-generator.js
Fibonacci ES6 Generator
function *fibonacci(n) {
const infinite = !n && n !== 0;
let current = 0;
let next = 1;
while (infinite || n--) {
yield current;
[current, next] = [next, current + next];
}
}