docker rm -f $(docker ps -aq)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Resets password, copy this into Users table in MySQL | |
* Drupal 7 | |
*/ | |
define('DRUPAL_ROOT', getcwd()); | |
require_once DRUPAL_ROOT . '/includes/bootstrap.inc'; | |
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Force location of /tmp for Appfog | |
*/ | |
$conf['file_temporary_path'] = realpath($_SERVER['DOCUMENT_ROOT'].'/../tmp'); | |
/* END */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checkout https://drupal.org/node/2146223 | |
# And https://github.com/mikebell/drupaldev-nginx | |
# | |
## | |
# cd ~/Vagrant | |
# vagrant box list | |
# vagrant init ubuntu12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function validateCleanPrice($num) { | |
$cleanString = preg_replace('/([^0-9\.,])/i', '', $num); | |
$onlyNumbersString = preg_replace('/([^0-9])/i', '', $num); | |
$separatorsCountToBeErased = strlen($cleanString) - strlen($onlyNumbersString) - 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Image RollOver Effect | |
* ======================================================================== | |
*/ | |
jQuery(".rollover").hover( | |
function () { | |
var iconName = jQuery(this).attr("src"); | |
var rollover = iconName.replace( /active/, 'rollover' ); | |
jQuery(this).attr({ src: rollover }); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyttsx3 | |
engine = pyttsx3.init() | |
rate = engine.getProperty('rate') | |
first_saying = 'And now for: boots and cats' | |
repeat_saying = 'and boots and cats ' | |
engine.say(first_saying) | |
engine.setProperty('rate', 360) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based off example code from Hal Robertson | |
// https://github.com/halrobertson/test-restify-passport-facebook | |
// See discussion: https://groups.google.com/forum/?fromgroups#!topic/passportjs/zCz0nXB_gao | |
var restify = require('restify') | |
// config vars | |
var FB_LOGIN_PATH = '/api/facebook_login' | |
var FB_CALLBACK_PATH = '/api/facebook_callback' | |
var FB_APPID = '<<YOUR APPID HERE>>' |
OlderNewer