Skip to content

Instantly share code, notes, and snippets.

View epoplive's full-sized avatar

Brett Thomas epoplive

  • Southern California
View GitHub Profile
@epoplive
epoplive / tesseract.rb
Created March 6, 2019 21:38 — forked from varenc/tesseract.rb
tesseract 4.0.0 from homebrew-core commit 793ad82ee5
class Tesseract < Formula
desc "OCR (Optical Character Recognition) engine"
homepage "https://github.com/tesseract-ocr/"
url "https://github.com/tesseract-ocr/tesseract/archive/4.0.0.tar.gz"
sha256 "a1f5422ca49a32e5f35c54dee5112b11b99928fc9f4ee6695cdc6768d69f61dd"
bottle do
sha256 "bb4b2eb8d8636c3f73bb692de94e833351ce505249f37e45a296ea633ffa9630" => :mojave
sha256 "9fd259800c2c9b7c56f2f5b64be234c93019a0c00f8578cf82d45c28726e04ea" => :high_sierra
sha256 "03335e88190bd7995f4ec721f84c54fa624733fde5af1086825292d287e8e7d6" => :sierra
@epoplive
epoplive / example.php
Created August 14, 2018 18:23 — forked from Webcreations907/example.php
Example VC Nesting
<?php
/************************************************************************
* Example Nested For VC
* vc_map() stuff should only be included when VC is enabled.
*
* This is just for a copy/paste test purpose.
*************************************************************************/
@epoplive
epoplive / shellcommand.sh
Created October 15, 2015 23:51 — forked from jankkhvej/shellcommand.sh
script to parse PHP short open tags and convert ones to normal
find project/dir/ -type f -iname "*.php" -exec php -d short_open_tag=On the_script.php {} \;
<?php
// Access a property with no restrictions
function stole($object,$property){
$dict = (array)$object;
$class = get_class($object);
return isset($dict[$property])?
$dict[$property]:(isset($dict["\0*\0$property"])?
$dict["\0*\0$property"]:(isset($dict["\0$class\0$property"])?
$dict["\0$class\0$property"]:null));
@epoplive
epoplive / invoke.php
Last active August 29, 2015 14:17 — forked from superic/invoke.php
$person = (object) array(
"name" => "Eric",
"location" => "SF",
"sayHello" => function () {
return "Hello!";
}
);
// does not work with anonymous functions in PHP
var_dump($person->sayHello());
@epoplive
epoplive / CI_phpStorm.php
Created November 6, 2012 21:05 — forked from topdown/CI_phpStorm.php
Code Completion for CodeIgniter in phpStorm
<?php die('This file is not really here!');
/**
* ------------- DO NOT UPLOAD THIS FILE TO LIVE SERVER ---------------------
*
* Implements code completion for CodeIgniter in phpStorm
* phpStorm indexes all class constructs, so if this file is in the project it will be loaded.
* -------------------------------------------------------------------
* Drop the following file into a CI project in phpStorm
* You can put it in the project root and phpStorm will load it.