Skip to content

Instantly share code, notes, and snippets.

View danielnv18's full-sized avatar

Daniel Noyola danielnv18

View GitHub Profile
@danielnv18
danielnv18 / download-drush.sh
Created December 31, 2014 20:48
Shell steps for install latest drush version
cd /usr/share
sudo git clone --branch master https://github.com/drush-ops/drush.git
@danielnv18
danielnv18 / example.info.yml
Created December 22, 2014 04:22
Ejemplo de un archivo info en drupal 8
name: El nombre que nuestro modulo va a tener
description: 'la descripción de nuestro modulo'
type: module
core: 8.x
@danielnv18
danielnv18 / .gitignoreAndroid
Created June 18, 2014 17:18
Git ignore for android projects
# built application files
*.apk
*.ap_
# files for the dex VM
*.dex
# Java class files
*.class
@danielnv18
danielnv18 / RemoveInvisibleCharacter.php
Created June 18, 2014 14:19
This also wipes newline . This will come handy if you are trying to printing javascript code within php
<?php
preg_replace('/\p{C}+/u', '', $topic_obj->description)
@danielnv18
danielnv18 / .gitignoreDrupal
Last active August 29, 2015 14:01
Git ignore for drupal projects
# Ignore configuration files that may contain sensitive information.
sites/*/settings*.php
# Ignore paths that contain user-generated content.
/sites/*/files
/sites/*/private
/files/*
/cache
# Packages #
<?php
function in_multiarray($elem, $array) {
$top = sizeof($array) - 1;
$bottom = 0;
while($bottom <= $top) {
if($array[$bottom] == $elem)
return true;
else
if(is_array($array[$bottom]))
if(in_multiarray($elem, ($array[$bottom])))