This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$social_data = [ | |
[ | |
'first' => 'John', | |
'middle' => 'Smith', | |
'last' => 'Doe', | |
'email' => '[email protected]' | |
], | |
[ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$final_notification = []; | |
foreach ($admin_notification as $an) { | |
if (!empty($an)) { | |
$final_notification[] = $an; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function sd($obj) { | |
if ($obj instanceof Illuminate\Database\Eloquent\Collection) { | |
var_dump(json_decode((string)$obj, true)); | |
} else { | |
var_dump((array)$obj); | |
} | |
} |
##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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (DB::getName() == 'pgsql') { | |
DB::statement('TRUNCATE users CASCADE'); | |
DB::statement('ALTER SEQUENCE users_id_seq RESTART WITH 1'); | |
} |
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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var param = "something"; | |
var my_src = "{{ URL::route('route', ['myparam' => 'xxx' ]) }}"; | |
var src = my_src.replace('xxx', param); |
PHP | Laravel | Web Scraping
A curated list of amazingly awesome PHP libraries, resources and shiny things.