Skip to content

Instantly share code, notes, and snippets.

View gk1's full-sized avatar

Greg Kennedy gk1

View GitHub Profile
<playercorefactory>
<players>
<!-- HiMedia Player definition -->
<player name="HimediaPlayer" type="ExternalPlayer" audio="false" video="true">
<filename>com.himedia.android.videoplayer</filename>
<hidexbmc>false</hidexbmc>
<playcountminimumtime>120</playcountminimumtime>
</player>
@gk1
gk1 / multiedit
Created December 4, 2014 01:38
multifile search and replace script
#!/bin/bash
_help="\n
Replace OLDSTRING with NEWSTRING recursively starting from current directory\n
multiedit [-n PATTERN] OLDSTRING NEWSTRING\n
[-n PATTERN] option limits to filenames matching PATTERN\n
Note: backslash escape special characters\n
Note: enclose STRINGS with spaces in double quotes\n
Example to limit the edit to python files:\n
multiedit -n \*.py \"OLD STRING\" NEWSTRING\n"
@gk1
gk1 / token.php
Created May 7, 2014 23:32
token.php used
<?php
// include our OAuth2 Server object
require_once __DIR__.'/server.php';
// Handle a request for an OAuth2.0 Access Token and send the response to the client
$server->handleTokenRequest(OAuth2\Request::createFromGlobals())->send();
?>
@gk1
gk1 / server.php
Created May 7, 2014 23:27
Generic oauth2 server attempting to utilize the UserCredentials Granttype with PDO Storage
<?php
$dsn = 'mysql:dbname=oauth;host=localhost';
$username = 'oauth';
$password = 'xxxx';
// error reporting (this is a demo, after all!)
ini_set('display_errors',1);error_reporting(E_ALL);
// Autoloading (composer is preferred, but for this example let's just do this)
require_once('oauth2-server-php/src/OAuth2/Autoloader.php');
@gk1
gk1 / gist:6772041
Created September 30, 2013 23:57
Log file for issue
[2013-09-26 11:32:48.539] [00F5EA58] [info] ############################################################################
[2013-09-26 11:32:48.546] [00F5EA58] [info] CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT)
[2013-09-26 11:32:48.547] [00F5EA58] [info] under the GNU General Public License GPLv3 or higher.
[2013-09-26 11:32:48.547] [00F5EA58] [info] Please see LICENSE.TXT for details.
[2013-09-26 11:32:48.547] [00F5EA58] [info] http://www.casparcg.com/
[2013-09-26 11:32:48.547] [00F5EA58] [info] ############################################################################
[2013-09-26 11:32:48.547] [00F5EA58] [info] Starting CasparCG Video and Graphics Playout Server 2.0.4.f27a404 Beta 1
[2013-09-26 11:32:48.547] [00F5EA58] [info] on Windows 7 Ultimate
[2013-09-26 11:32:48.548] [00F5EA58] [info] Intel(R) Core(TM) i7 CPU 870 @ 2.93GHz Physical Threads: 8
[2013-09-26 11:32:48.548] [00F5EA58] [info] H57H-M