Skip to content

Instantly share code, notes, and snippets.

View alvarezr's full-sized avatar

Robert alvarez alvarezr

View GitHub Profile
@alvarezr
alvarezr / object.js
Created November 4, 2015 15:08
Javascript - Object Constructor
// Object Constructor
function Car(){
// private variable
var speed = 0;
// public methods
return {
accelrate : function(s){
speed = speed + s;
@alvarezr
alvarezr / gist:c86baf5d21e0aed53cd3
Last active August 29, 2015 14:07
Sparse theme Changes(fix Textblock editor)
/* Sparse theme Textblock */
// Theme Location
// Sparse/wpbakery/js_composer/
// Edit File : js_composer/asstes/js/backend/composer-view.js
// function _killEditor(){
@alvarezr
alvarezr / gist:5540771
Last active December 17, 2015 03:08
Example of how to delete duplicate entry
-- DELETE duplicate entry
BEGIN;
CREATE
TABLE tempT SELECT MIN(id) id
FROM L_table
GROUP BY l_field, etc ASC;
DELETE
FROM L_table
WHERE id NOT IN (SELECT id
FROM tempT);
<?php
/**
* @author Arlo Carreon
* @author Robert Alvarez
*
*/
class Permissions {
// Bitmasks
const REPORTS = 1;