Skip to content

Instantly share code, notes, and snippets.

View fullybaked's full-sized avatar

David Baker fullybaked

View GitHub Profile
@aaronklaassen
aaronklaassen / roa_2016.md
Last active February 26, 2017 04:24
Ruby on Ales 2016

OKAY FOLKS GET HYPE the conf talk videos from Ruby on Ales are just going up and I have opinions.

🍻🍻🍻

For the curious

Honestly they were all good; no real duds. But I have a few highlights/recommendations. I know most of you aren't writing Ruby, but honestly I don't think it really matters. In particular my favorite talks here aren't even really very Ruby-specific; the code examples are, of course, but those are just examples. The content is obviously generalizable.

@dkarchmer
dkarchmer / django_request_factory_test.py
Last active September 20, 2023 06:19
Sample code for using RequestFactory to do Django Unit Testing - Get and Post
from django.test import TestCase, RequestFactory
from django.utils.importlib import import_module
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.contrib.sessions.middleware import SessionMiddleware
from django.contrib.messages.middleware import MessageMiddleware
from rest_framework import status
from .models import *
@olivierlacan
olivierlacan / migrate_postgresql_database.md
Last active March 24, 2022 20:30
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X. See upgraded version of this guide: http://olivierlacan.com/posts/migrating-homebrew-postgres-to-a-new-version/

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@paulirish
paulirish / bling.js
Last active February 20, 2024 14:11
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
<?php
class FeatureContext {
/**
* Reads the available fixtures
*
* @return array
*/
public static function readFixtures() {
$fixtures = [];
@visamz
visamz / baciuzzi_queue.conf
Last active March 27, 2020 06:44
Beanstalkd and Supervisor Config. For CentOS, a modified /etc/init.d/beanstlkd file which creates a pid file in /var/run/beanstalkd.pid
[program:baciuzzi_queue]
directory=/data2/www/baciuzzi
command=php artisan queue:listen --tries=3
stdout_logfile=/data2/www/baciuzzi/app/storage/logs/supervisor.log
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stdout_capture_maxbytes=1MB
stderr_logfile=/data2/www/baciuzzi/app/storage/logs/supervisor_error.log
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10
@Najaf
Najaf / SECURITY.md
Last active September 10, 2015 19:31

Security inspections

At the beginning of each month, we carry out a brief, high-level security inspection. The purpose is to be a sanity check for head-slapping, trivial vulnerabilities that no one expected would be in the code but somehow managed to creep in anyway.

Who's responsible?

One of @alice, @bob or @charlie should do the inspection if no one else has the time.

How often?

@ldong
ldong / fix_relink_virtualbox_to_vagrant.md
Last active August 3, 2016 02:06
Relink vbox to vagrant
@jeremeamia
jeremeamia / exceptional.php
Last active August 29, 2015 13:57
Throwing and catching non-existent exceptions with class autoloading and aliasing.
<?php
namespace My\Lib
{
class BaseException extends \Exception {}
}
namespace
{
// This should be registered at the end of the autoloading pipeline

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