Skip to content

Instantly share code, notes, and snippets.

View dogmatic69's full-sized avatar
🎯
Building the new IKEA

Carl Sutton dogmatic69

🎯
Building the new IKEA
View GitHub Profile
pgweb:
image: sosedoff/pgweb:latest
links:
- "postgresql:db"
environment:
DATABASE_URL: "postgres://postgres:postgres@db:5432/postgres"

Keybase proof

I hereby claim:

  • I am dogmatic69 on github.
  • I am dogmatic69 (https://keybase.io/dogmatic69) on keybase.
  • I have a public key whose fingerprint is 57CD 94AF F90D 1C18 C9AD B8C4 C616 7B02 CD5D 8480

To claim this, I am signing this object:

@dogmatic69
dogmatic69 / symlink_assets.php
Created November 23, 2010 22:03
link to plugin and theme assets in CakePHP
@dogmatic69
dogmatic69 / calling.php
Created February 2, 2016 10:24
make calling shitty methods with too many parameters much better.
<?php
class Foo {
function bar($a, $b, $c) {
echo '$a - $b - $c :: ' . implode(' - ', func_get_args());
}
}
function angular($callable, $args) {
$reflection = new ReflectionMethod($callable[0], $callable[1]);
$params = array();
#!/bin/bash
DAY=$(date +"%a")
NOW=$(date +"%Y-%m-%d")
DATETIME=$(date +"%Y-%m-%d-%H:%M")
BACKUPHOME=/home/backups
BACKUPWORKING=$BACKUPHOME/.working
BACKUP=$BACKUPWORKING/.$$
EMAIL="some@email.com"
[
{ "keys": ["ctrl+shift+a"], "command": "select_all" },
{ "keys": ["ctrl+a"], "command": "expand_selection", "args": {"to": "scope"} },
{ "keys": ["alt+shift+f"], "command": "reindent", "args": {"single_line": false} }
]
@dogmatic69
dogmatic69 / private.php
Last active October 22, 2015 08:24
calling private methods in a class through a proxy class using closure binding.
<?php
/**
* Class with private methods that you need to access
*/
class Something {
private function _wtf() {
return 'yey';
}
@dogmatic69
dogmatic69 / post-receive.sh
Created November 11, 2012 02:17
Git deploy hook for Infinitas
#!/bin/sh
cd ..
env -i git reset --hard
env -i git submodule update --recursive
env -i Console/cake data.clear_cache
@dogmatic69
dogmatic69 / nef2png.sh
Created August 28, 2012 14:56
convert nikon NEF files to png
#!/bin/bash
##################################
# Convert files to png #
# #
# #
##################################
files=`ls ./`;
if [ ! -d png ]
then
@dogmatic69
dogmatic69 / git-svn-post-import.php
Last active September 28, 2015 10:09
After running git svn clone, handy little script that will create all the correct branches and tags for the repo
#!/usr/bin/php5
<?php
$branches = array_filter(explode("\n", `git branch -r`));
`clear`;
foreach((array)$branches as $branch) {
echo sprintf("Working on %s\n======================================\n\n", $branch);
$commands = array();
$branch = trim($branch);
if(empty($branch)) {