Combines python-inquirer and git-amend-old to make git fix.
This gives you the possibility to amend a specific commit very easily.
Thanks to @magmax and @colinodell
$ telnet jmikola.net 8888 | |
Trying 97.107.131.54... | |
Connected to jmikola.net. | |
Escape character is '^]'. | |
hello | |
131.107.200.34: hi | |
131.107.200.34: hello | |
69.164.215.64: YOLO | |
131.107.200.34: hello | |
131.107.200.34: Hello Jeremy |
Combines python-inquirer and git-amend-old to make git fix.
This gives you the possibility to amend a specific commit very easily.
Thanks to @magmax and @colinodell
#!/bin/sh | |
# | |
# Prevents debug traces and sensitive data to be commited. | |
# | |
# What to search for | |
FUNCTIONS='var_dump\(|phpinfo\(|print_r\(' | |
# Prevent the commit if something is found. | |
# default: true |
/* This WAS a two-line function until an awesome reddit user pointed out my logical flaw. Now It's a 5-line function :( */ | |
var Class = function(d){ | |
d.constructor.extend = function(def){ | |
for (var k in d) if (!def.hasOwnProperty(k)) def[k] = d[k]; | |
return Class(def); | |
}; | |
return (d.constructor.prototype = d).constructor; | |
}; |
function type(obj) { | |
var obj_type = typeof obj; | |
return({ is : function(type) { return obj_type === type; }, | |
is_object : function() { return obj_type === "object"; }, | |
is_func : function() { return obj_type === "function"; }, | |
is_string : function() { return obj_type === "string"; }}); | |
}; | |
function maybe(item) { |
diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php | |
index d567b6e..9a98440 100644 | |
--- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php | |
+++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php | |
@@ -119,8 +119,8 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex | |
{ | |
$client = new SoapClient($wsdl, array('trace' => $trace)); | |
$client->__setLocation($this->getConfigFlag('sandbox_mode') | |
- ? 'https://wsbeta.fedex.com:443/web-services/rate' | |
- : 'https://ws.fedex.com:443/web-services/rate' |
# Don't include any temporary files and other unimportant things | |
*.log | |
*.bak | |
*.bak.* | |
*.thumbs/ | |
.DS_Store | |
Thumbs.db | |
.svn | |
*.swp |
doctrine: | |
dbal: | |
driver: pdo_sqlite | |
path: :memory: | |
memory: true | |
orm: | |
auto_generate_proxy_classes: true | |
auto_mapping: true |
#!/bin/bash | |
if [ "$#" -ne "2" ]; then | |
echo "Usage: ./install-redis-instance.sh NAME PORT" | |
exit 1 | |
fi | |
if [ ! -x /usr/local/bin/redis-server ]; then | |
apt-get install -y build-essential | |
curl -O -L http://download.redis.io/releases/redis-2.8.9.tar.gz |
A generalized depth and breadth-first tree search algorithm
Here's a neat little algorithm that can perform a depth-first search (DFS) or breadth-first search (BFS) by simply changing the collection data type:
search( Node root ) {
Collection c = new Collection()
c.push( root )