Skip to content

Instantly share code, notes, and snippets.

View PetrovStark's full-sized avatar
🏠
Coding from home

Petrus Nogueira PetrovStark

🏠
Coding from home
  • Tech Lead - GPM Soluções
  • Fortaleza - CE
  • X @petrovzki
View GitHub Profile
<?php
define('DEFAULT_TIMEZONE', 'America/Fortaleza');
define('WORKING_DAY_MONDAY', 1);
define('WORKING_DAY_TUESDAY', 2);
define('WORKING_DAY_WEDNESDAY', 3);
define('WORKING_DAY_THURSDAY', 4);
define('WORKING_DAY_FRIDAY', 5);
define('WORKING_DAY_SATURDAY', 6);
define('WORKING_DAY_SUNDAY', 7);
@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@benbalter
benbalter / wp-db.tutorial.php
Created January 13, 2012 18:41
WordPress DB Tutorial
<?php
//absolute path to wp-load.php, or relative to this script
//e.g., ../wp-core/wp-load.php
include( 'trunk/wp-load.php' );
//grab the WPDB database object, using WP's database
//more info: http://codex.wordpress.org/Class_Reference/wpdb
global $wpdb;