Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am matula on github.
  • I am matula (https://keybase.io/matula) on keybase.
  • I have a public key ASDWtZbNI9uI4Tfizwme1WTwq2foq7_3bxY5_cqgIbYd2go

To claim this, I am signing this object:

Library "Roku_Ads.brs"
sub init()
print "PlayerTask.brs [init]"
m.top.functionName = "playContentWithAds"
m.top.id = "PlayerTask"
end sub
sub playContentWithAds()
print "PlayerTask.brs [playContentWithAds]"
@matula
matula / PushNotifications.php
Created February 22, 2017 03:41 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@matula
matula / awesm.md
Last active February 19, 2024 16:23
Awesome PHP stuff in one Gist
var param = "something";
var my_src = "{{ URL::route('route', ['myparam' => 'xxx' ]) }}";
var src = my_src.replace('xxx', param);
{"public":true,"files":{"undefined.skema":{"content":"[{\"name\":\"Bears\",\"color\":\"Blue\",\"position\":{\"x\":177,\"y\":85},\"modelclass\":\"Bear\",\"increment\":false,\"timestamp\":false,\"softdelete\":false,\"column\":[{\"colid\":\"c217\",\"name\":\"id\",\"type\":\"increments\",\"length\":\"0\",\"order\":0,\"defaultvalue\":\"\",\"enumvalue\":\"\"},{\"colid\":\"c218\",\"name\":\"name\",\"type\":\"string\",\"length\":\"200\",\"order\":1,\"defaultvalue\":\"\",\"enumvalue\":\"\"},{\"colid\":\"c219\",\"name\":\"danger_level\",\"type\":\"string\",\"length\":\"200\",\"order\":2,\"defaultvalue\":\"\",\"enumvalue\":\"\"}],\"relation\":[{\"extramethods\":\"\",\"foreignkeys\":\"bear_id, picnic_id\",\"name\":\"picnics\",\"relatedmodel\":\"Picnics\",\"relationtype\":\"belongsToMany\",\"usenamespace\":\"\"}],\"seeding\":[]},{\"name\":\"Picnics\",\"color\":\"Red\",\"position\":{\"x\":201,\"y\":520},\"modelclass\":\"Picnic\",\"increment\":\"\",\"timestamp\":\"\",\"softdelete\":\"\",\"column\":[{\"colid\":\"c272\",\"nam
@matula
matula / keybase.md
Created September 23, 2014 17:19
keybase.md

Keybase proof

I hereby claim:

  • I am matula on github.
  • I am matula (https://keybase.io/matula) on keybase.
  • I have a public key whose fingerprint is 5DFF E2A2 72B3 3704 05F0 B08B DCF5 E459 7753 DC6D

To claim this, I am signing this object:

@matula
matula / psql-truncate.php
Created July 13, 2014 03:48
Truncate Table in Laravel for a table with foreign keys.
<?php
if (DB::getName() == 'pgsql') {
DB::statement('TRUNCATE users CASCADE');
DB::statement('ALTER SEQUENCE users_id_seq RESTART WITH 1');
}
@matula
matula / dev.md
Last active August 29, 2015 13:59
Things a "full stack" developer needs to know

##Things a "full stack" developer needs to know...

  • Backend Languages/ Scripting - specializing in (at least) one, but knowledgable of others: PHP, Python, Ruby, Java, Go, Perl. Bonus points for Erlang, C, C++
  • Unix Shell/Terminal/Console - sh, bash, zsh
  • Frontend Languages/ Scripting - HTML5, CSS3, Javascript
  • Frameworks - the most popular for each language: Symfony, Zend, Laravel, Django, Flask, Pylons, Rails, Sinatra, Play, Grails, Revel, Node, Angular, Backbone
  • Frontend Frameworks - Bootstrap, LESS, SASS
  • IDEs/Code Editors - PHPStorm, Sublime, Eclipse, NetBeans, xCode, Vim
  • OSes - OSX, Linux (Ubuntu 12+, CentOS, Arch), Unix, bonus points for Windows
  • Servers - Apache, Nginx
  • Databases - relational: MySQL, PostgreSQL, SQLite ... non-relational: Mongo, Couch, Cassandra, Redis
@matula
matula / sd.php
Last active August 29, 2015 13:57
Helper function to var_dump either Eloquent models or a regular object/array
<?php
function sd($obj) {
if ($obj instanceof Illuminate\Database\Eloquent\Collection) {
var_dump(json_decode((string)$obj, true));
} else {
var_dump((array)$obj);
}
}