Skip to content

Instantly share code, notes, and snippets.

View heanfig's full-sized avatar

Herman Andres Figueroa heanfig

View GitHub Profile
<?php
//Envio 8 de mayo de 2017
$m = array(
"3002352132",
"3002476807",
"3003195381",
"3003338429",
"3003688627",
"3003995796",
"3004635014",
@heanfig
heanfig / TwilioApi.php
Created September 15, 2017 16:11
TwilioApi.php for mautic instances for zopp digital
<?php
/*
* @copyright 2016 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
@heanfig
heanfig / reduce.php
Last active August 30, 2017 20:20
Remove separator
add_filter( 'document_title_separator', 'cyb_document_title_separator' );
function cyb_document_title_separator( $sep ) {
$sep = "-";
return $sep;
}
@heanfig
heanfig / publickey-git-error.markdown
Created July 10, 2017 01:06 — forked from adamjohnson/publickey-git-error.markdown
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "[email protected]". Th
@heanfig
heanfig / solution.js
Last active June 26, 2017 05:36
30 days of code
/* Day 8: Dictionaries and Maps
# Task
# Given N names and phone numbers, assemble a phone book that maps friends' names to their respective phone numbers. You will then be
# given an unknown number of names to query your phone book for; for each queried, print the associated entry from your phone book (in
# the form name = phoneNumber) or Not found if there is no entry for name.
# Note: Your phone book should be a Dictionary/Map/HashMap data structure.
# Input Format
@heanfig
heanfig / gist:1f3eba8e03fdbd613778b6c8736a6efd
Created April 29, 2017 18:27 — forked from murum/gist:47b35085dfb603d56b82
Wordpress gulp with PHP browsersync
///// Plugin Includes /////
var gulp = require('gulp'),
uglify = require('gulp-uglify'),
plumber = require('gulp-plumber'),
concat = require('gulp-concat'),
jshint = require('gulp-jshint'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync'),
reload = browserSync.reload,
sass = require('gulp-sass');
@heanfig
heanfig / gist:cfd08228579ddd68e2a2a1002d798cb3
Created March 23, 2017 04:19 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | πŸ˜„ | πŸ˜† | 😊 | πŸ˜ƒ | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | πŸ˜† | 😁 | πŸ˜‰ | :wink2: | πŸ‘… | πŸ˜’ | πŸ˜… | πŸ˜“

😩 | πŸ˜” | 😞 | πŸ˜– | 😨 | 😰 | 😣 | 😒 | 😭 | πŸ˜‚ | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😑 | 😀 | πŸ˜ͺ | πŸ˜‹ | 😷

😎 | 😡 | πŸ‘Ώ | 😈 | 😐 | 😢 | πŸ˜‡ | πŸ‘½ | πŸ’› | πŸ’™ | πŸ’œ | ❀️ | πŸ’š | πŸ’” | πŸ’“ | πŸ’— | πŸ’• | πŸ’ž | πŸ’˜ | ✨

@heanfig
heanfig / linkedlistnode.java
Created March 2, 2017 05:13
linkedlistnode.java
import java.util.EmptyStackException;
import java.util.Scanner;
public class IntStack {
private static final String STRING_BEGIN = "[";
private static final String STRING_END = "]";
private static final String SEPARATOR = ", ";
private static final class IntStackNode {
@heanfig
heanfig / COLECCIONMAX.java
Last active March 2, 2017 05:10
COLECCIONMAX.java
public static void main(String args[])
{
LinkedList<Integer> list = new LinkedList<Integer>();
list.add(1);
list.add(2);
list.add(3);
list.add(4);
list.add(5);
System.out.println(Collections.max(list));
}
@heanfig
heanfig / iteraccion.js
Last active March 2, 2017 04:46
Iteracion.js
function isMayor(palabra,indice,valor,iteraccion){
var vocals = ["a","e","i","o","u"];
var reg = new RegExp("[^" + vocals[iteraccion] + "]", "g");
var counterWord = palabra.replace(reg, "").length;
if(iteraccion == 5){
return "La letra que mas se repite es " + vocals[indice];
}