Skip to content

Instantly share code, notes, and snippets.

View darrylhein's full-sized avatar

Darryl Hein darrylhein

View GitHub Profile
@darrylhein
darrylhein / SassMeister-input.scss
Created August 21, 2015 04:56
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// ----
@font-face {
font-family: "Special Chars";
src: local("Gill Sans"), local("Gill Sans MT"), local("Calibri");
unicode-range: U+26, U+2A;
}
.class {
color: #fff;
&:hover { color: #f00; }
}
.class {
position: absolute;
display: block;
max-width: 100em;
width: 10em;
h1 {
strong { color: #f00; }
&:before { background: #0f0; }
}
// would result in
h1 strong { color: #f00; }
h1:before { background: #0f0; }

Keybase proof

I hereby claim:

  • I am darrylhein on github.
  • I am darrylhein (https://keybase.io/darrylhein) on keybase.
  • I have a public key whose fingerprint is BDA1 B192 67D1 7A8C 020D 8C25 47A9 F019 0269 6386

To claim this, I am signing this object:

// attempt to find the extension
$phone_ext_parts = explode('x', $_value);
if (isset($phone_ext_parts[1])) {
$phone_ext = preg_replace("/\D/", "", $phone_ext_parts[1]);
$phone_part_1 = preg_replace("/\D/", "-", $phone_ext_parts[0]);
} else {
$phone_ext = '';
$phone_part_1 = preg_replace("/\D/", "-", $_value);
}
'user_id' => array(
'field_type' => 'Select',
'list_flag' => TRUE,
'edit_flag' => TRUE,
'search_flag' => TRUE,
'view_flag' => TRUE,
'is_nullable' => FALSE,
'field_options' => array(
'source' => array(
'source' => 'array',
@darrylhein
darrylhein / nav.php
Last active January 3, 2016 01:59
Adding nav items
<?php defined('SYSPATH') or die ('No direct script access.');
return array(
'private' => array(
'items' => array(
'Client' => array(
'route' => 'domain',
'logged_in_only' => TRUE,
'order' => 105,
'sub_menu' => array(
@darrylhein
darrylhein / gist:8347340
Last active January 2, 2016 18:59
Search for sets in Kohana/XM ORM
<?php
/**
* Also used by ORM_Radios & ORM_YesNo & ORM_Gender (through ORM_Radios)
*
* @param mixed $column_name
* @param mixed $value
* @return array
*/
public static function search_prepare($column_name, $value, array $options = array(), ORM $orm_model = NULL) {
@darrylhein
darrylhein / run.php
Created May 2, 2012 04:45
Copy data from another MantisBT into another install
<?php
// migrates the data from one mantis install to another
// make sure to backup your data before running, just incase!!!!
// will keep the bug id (ie, mantis id)
// before importing, make sure that the bug ids won't conflict (ie, mantis_bug_table)
// because this may also migrate the files inside the mantis tables, run this at the command line with the memory set: php -d memory_limit=256M run.php
// todo: only include the bugnote_text and bug_text records that have associated bugnotes and bugs (right now it copies all of them)