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
#cloud-config | |
coreos: | |
etcd: | |
discovery: https://discovery.etcd.io/stuff | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 | |
units: | |
- name: fleet-metadata.service | |
command: start |
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
Mage::app("default"); | |
$username = 'admin'; | |
$password = 'password'; | |
try{ | |
$authenticated = Mage::getModel('admin/user')->authenticate($username, $password); | |
} catch ( Exception $e ) { | |
$authenticated = false; | |
} |
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
// Retrieve Customer by Email (or other method) | |
$customer = Mage::getModel('customer/customer') | |
->setWebsiteId(Mage::app()->getStore()->getWebsiteId()) | |
->loadByEmail($email); | |
// Set as Logged In and Clear Session | |
Mage::getSingleton('customer/session')->setCustomerAsLoggedIn($customer) | |
->renewSession(); | |
// Redirect or do something here :) |
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
Mage::app("default"); | |
// Set the variables that we care about. | |
$storeId = 1; | |
$username = '[email protected]'; | |
$password = 'theirpassword'; | |
try{ | |
$authenticated = Mage::getModel('customer/customer') | |
->setWebsiteId($storeId) |
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
###################################### | |
# Git-Enhanced Bash Prompt # | |
###################################### | |
txtred='\033[0;31m' | |
txtgrn='\033[0;32m' | |
txtylw='\033[1;33m' | |
txtltcyn='\033[1;36m' | |
end='\033[0m' | |
# Color-Coded Name of Branch |