Skip to content

Instantly share code, notes, and snippets.

Luis Troya LTroya

  • Santiago, Chile
Block or report user

Report or block LTroya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@irazasyed
irazasyed / Install Composer using MAMP's PHP.md
Last active Nov 14, 2019
Instructions on how to change preinstalled Mac OS X PHP to MAMP's PHP Installation and then install Composer Package Management
View Install Composer using MAMP's PHP.md

Change default Mac OS X PHP to MAMP's PHP Installation and Install Composer Package Management


Instructions to Change PHP Installation


First, Lets find out what version of PHP we're running (To find out if it's the default version).

To do that, Within the terminal, Fire this command:

which php
@khanhtran3005
khanhtran3005 / php - nodejs
Last active Apr 14, 2019
Share session between PHP and NodeJS
View php - nodejs
http://stackoverflow.com/questions/24296212/php-nodejs-and-sessions#24303059
You can use memcached as your session storage handler in PHP. Memcached is a simple key value store that can be accessed via TCP; there is a memcached module available for Node.js.
PHP stores the session in memcached by using the session id as the key. The session data (value) stored in memcached is a serialized PHP object, with a slight twist. You can read more about this unusual serialization at the SO question "Parse PHP Session in Javascript". Luckily though, there is already an NPM module out there: php-unserialize.
Now for the How-To.
Assumptions
@Richzendy
Richzendy / Reglas_Principales_para_entrar_al_mundo_de_Wordpress.md
Last active Aug 3, 2018
Reglas Principales para entrar al mundo de Wordpress
View Reglas_Principales_para_entrar_al_mundo_de_Wordpress.md
  1. Empieza por leer (lo siento, está en inglés) el diccionario de terminología WordPress de la A-Z: https://premium.wpmudev.org/blog/wordpress-dictionary/
  2. Antes de codear algo en WP, busca un plugin o tema, hay miles de ellos, si no sabes cual usar, pregunta.
  3. Si vas a codear o modificar templates, aprende "Child Themes" y la jerarquia de ejecución https://developer.wordpress.org/themes/basics/template-hierarchy/
  4. Si vas a codear plugins o templates para WP, revisa la API, hay cientos de funciones ya hechas https://codex.wordpress.org/WordPress_APIs por ejemplo, ya WP tiene un sistema de manejo de llamadas AJAX built in ( https://codex.wordpress.org/AJAX_in_Plugins) y un ejemplo más didáctico del uso de AJAX dentro de WP lo puedes encontrar por acá https://premium.wpmudev.org/blog/using-ajax-with-wordpress/
  5. WP parece sencillo y en su estado puro no parece la gran cosa pero puede ser extendido fácilmente, aprende de "custom posts" y "custom fields" para personalizarlo ( advanced custom fields es un
@nasrulhazim
nasrulhazim / readme.md
Last active Sep 3, 2018
Using Middleware to Check Account Activation and Resend Activation E-mail
@calebporzio
calebporzio / tinker_helper.php
Created Jan 30, 2019
A quick, memorable way to initiate an "artisan tinker" session and play with variables.
View tinker_helper.php
<?php
function tinker(...$args) {
// Because there is no way of knowing what variable names
// the caller of this function used with the php run-time,
// we have to get clever. My solution is to peek at the
// stack trace, open up the file that called "tinker()"
// and parse out any variable names, so I can load
// them in the tinker shell and preserve their names.
You can’t perform that action at this time.