Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
SLACK_WEBHOOK_URL=$(git config --get hooks.slack.webhook-url)
SLACK_USERNAME="Deploy Bot"
REPO_PATH="$(dirname ${BASH_SOURCE[0]})/.."
GIT_MESSAGE=$(git --git-dir ${REPO_PATH} show -l 1 -s)
curl -X POST --data "payload={ \"username\": \"${SLACK_USERNAME}\", \"text\": \"${GIT_MESSAGE}\"}" ${SLACK_WEBHOOK_URL}
@ckdarby
ckdarby / Config_test.php
Created June 5, 2012 19:15
CI /tests/codeigniter/core/Config_test.php
public function set_up()
{
$cls =& $this->ci_core_class('cfg');
// set predictable config values
$this->ci_set_config(array(
'index_page' => 'index.php',
'base_url' => 'http://example.com/',
'subclass_prefix' => 'MY_'
));
@ckdarby
ckdarby / config.php
Created June 5, 2012 23:33
Example that bcit-ci/CodeIgniter#1291 has been fixed
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* application/config/config.php
*
*/
//These are the only options in refernece to this issue
$config['base_url'] = '';
$config['csrf_protection'] = TRUE;
@ckdarby
ckdarby / welcome.php
Created June 6, 2012 00:30
Issue #1328
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* application/controllers/welcome.php
*
*/
class Welcome extends CI_Controller {
public function index()
{
CREATE DEFINER=`user`@`localhost` PROCEDURE `test`()
BEGIN
SELECT * FROM users;
END
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* application/controller/welcome.php
*
*/
class Welcome extends CI_Controller {
public function index()
@ckdarby
ckdarby / log
Created October 10, 2012 15:24
Error log
`DEBUG - 2012-10-10 11:21:29 --> Config Class Initialized
DEBUG - 2012-10-10 11:21:29 --> Hooks Class Initialized
DEBUG - 2012-10-10 11:21:29 --> Utf8 Class Initialized
DEBUG - 2012-10-10 11:21:29 --> UTF-8 Support Enabled
DEBUG - 2012-10-10 11:21:29 --> URI Class Initialized
DEBUG - 2012-10-10 11:21:29 --> Router Class Initialized
DEBUG - 2012-10-10 11:21:29 --> Output Class Initialized
DEBUG - 2012-10-10 11:21:29 --> Security Class Initialized
DEBUG - 2012-10-10 11:21:29 --> Input Class Initialized
@ckdarby
ckdarby / monolog.php
Created June 27, 2013 14:07
Just messing around with monolog
<?php
include_once('vendor/autoload.php');
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Formatter\LineFormatter;
//Create a log channel
$log = new Logger('Test');
[container] Public services
Service Id Scope Class Name
annotation_reader container Doctrine\Common\Annotations\FileCacheReader
assetic.asset_manager container Assetic\Factory\LazyAssetManager
assetic.controller prototype Symfony\Bundle\AsseticBundle\Controller\AsseticController
assetic.filter.cssrewrite container Assetic\Filter\CssRewriteFilter
assetic.filter_manager container Symfony\Bundle\AsseticBundle\FilterManager
assetic.request_listener container Symfony\Bundle\AsseticBundle\EventListener\RequestListener
cache_clearer container Symfony\Component\HttpKernel\CacheClearer\ChainCacheClearer
cache_warmer container Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate
@ckdarby
ckdarby / obs.log
Created August 25, 2013 02:58
OBS
19:39:51: Open Broadcaster Software v0.552b - 64bit ( ^ω^)
19:39:51: -------------------------------
19:39:51: CPU Name: Intel(R) Core(TM) i5-3350P CPU @ 3.10GHz
19:39:51: CPU Speed: 3099MHz
19:39:51: Physical Memory: 16349MB Total, 12115MB Free
19:39:51: stepping id: 9, model 10, family 6, type 0, extmodel 1, extfamily 0, HTT 1, logical cores 4, total cores 4
19:39:51: monitor 1: pos={0, 0}, size={1920, 1080}
19:39:51: monitor 2: pos={-1920, 0}, size={1920, 1080}
19:39:51: Windows Version: 6.1 Build 7601 S
19:39:51: Aero is Disabled