Skip to content

Instantly share code, notes, and snippets.

💻
Learning me some Golang

Colin O'Dell colinodell

💻
Learning me some Golang
Block or report user

Report or block colinodell

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
@jmikola
jmikola / transcript.txt
Created Oct 10, 2014
Symfony Live NYC ReactPHP chat server
View transcript.txt
$ 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
View README.md

git fix

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

https://github.com/magmax/python-inquirer

@vimishor
vimishor / pre-commit
Created Apr 14, 2015
Prevents debug traces and sensitive data to be commited.
View pre-commit
#!/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
@jrf0110
jrf0110 / class.js
Created Apr 23, 2012
Simple extendable classes in javascript
View class.js
/* 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;
};
View maybe_without_objects.js
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) {
@philwinkle
philwinkle / ce-1.6.2.0\app\code\core\Mage\Usa\Model\Shipping\Carrier\Fedex.php
Last active Oct 7, 2016
Git diff of Fedex SOAP API endpoint change - CE 1.6, 1.7, 1.8 and EE 1.11, 1.12, 1.13
View ce-1.6.2.0\app\code\core\Mage\Usa\Model\Shipping\Carrier\Fedex.php
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'
@colinodell
colinodell / .gitignore
Last active Mar 13, 2017
Standard Magento .gitignore
View .gitignore
# Don't include any temporary files and other unimportant things
*.log
*.bak
*.bak.*
*.thumbs/
.DS_Store
Thumbs.db
.svn
*.swp
@wowo
wowo / config_test.yml
Created Jun 14, 2011
Doctrine sqlite in memory for tests purposes
View config_test.yml
doctrine:
dbal:
driver: pdo_sqlite
path: :memory:
memory: true
orm:
auto_generate_proxy_classes: true
auto_mapping: true
@czarneckid
czarneckid / gist:762065
Created Jan 1, 2011
Creating high score leaderboards with Redis
View gist:762065
NOTE: You will need at least Redis 2.1.6 to use the ZREVRANGEBYSCORE method.
Add players to HIGHSCORES table:
fossil:~ dczarnecki$ redis-cli
redis> zadd HIGHSCORES 1 player_1
(integer) 1
redis> zadd HIGHSCORES 2 player_2
(integer) 1
redis> zadd HIGHSCORES 3 player_3
@ianunruh
ianunruh / install-redis.sh
Last active Jul 13, 2018
Install single instance of Redis on Ubuntu 14.04
View install-redis.sh
#!/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
You can’t perform that action at this time.