Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Wern Ancheta anchetaWern

🏠
Working from home
View GitHub Profile
View newhtml.html
<html>
<head>
<link rel="stylesheet" href="#">
<link rel="stylesheet" href="#">
</head>
<body>
<div class="container">
<div class="header"></div>
<div class="sidebar"></div>
<div class="footer"></div>
View caching.php
if(Cache::has('admin_defaults')){
$admin_defaults = Cache::get('admin_defaults');
array_push($admin_defaults[$department . '_roles'], (object)array('role' => $role));
Cache::put('admin_defaults', $admin_defaults, 10);
}
View lums
---
layout: post
title: "Building a user management system using Laravel"
date: 2012-11-24 22:10
comments: true
categories: [php, laravel]
published: true
---
There's no shortage of good resources for learning laravel.
@anchetaWern
anchetaWern / ums-generate_migration.txt
Created Dec 5, 2012
Generates database migrations for ums
View ums-generate_migration.txt
php artisan generate:migration create_departments_table
department:string
php artisan generate:migration create_roles_table
department_id:integer role:string
php artisan generate:migration create_transactions_table
department_id:integer main_menu:string menu_text:string address:string
php artisan generate:migration create_rolestransactions_table
@anchetaWern
anchetaWern / phpunit.php
Created Dec 6, 2012
Getting Started with PHP Unit Testing
View phpunit.php
---
layout: post
title: "Playing with Unit Testing in PHP"
date: 2012-12-05 19:14
comments: true
categories:
published: true
---
I finally got the time to play around with unit testing in PHP.
@anchetaWern
anchetaWern / php_unit_testing.markdown
Created Dec 6, 2012
Getting Started with Unit Testing in PHP
View php_unit_testing.markdown

I finally got the time to play around with unit testing in PHP. I've heard about the term months ago but I really never had the time to play around with it because I considered it as not absolutely necessary for my development workflow. I mean I can still produce useable programs without writing a test for it right?

But admit it, testing the program that you have written is not really that exciting as writing the program itself. Sometimes we even get lazy and not test the program at all only to find things breaking on production. (Note: I'm referring to in-browser testing here)

@anchetaWern
anchetaWern / laravel-ums.markdown
Created Dec 6, 2012
Building a User Management System in Laravel
View laravel-ums.markdown

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
View things
Things I wish I was told when I first started Web Development
In this post I want to share some of the things I wish someone told me when I first started Web Development.
Things that could have made me a better developer.
Things that could have gotten me into the right path when I first started.
###The learning doesn't stop
There's always a new technology, tools, and methodology
View Getting Started With Wordpress Plugin Development.markdown

In this article I'm going to walk you through process of creating Wordpress plugins. First I'm going to talk about some of the basic concepts in Wordpress plugin development like the actions, hooks, and API's that makes up Wordpress. Then were going to build a plugin where we apply some of the concepts and best practices in developing Wordpress plugins.

###Prerequisites

In order to fully benefit from this tutorial you should have a basic knowledge on PHP. As Wordpress is running on PHP and most of the code that we will be writing will be on PHP. A little bit of knowledge on HTML, CSS and JavaScript is also helpful but not required for this tutorial.

View php-webscraping.md

Have you ever wanted to get a specific data from another website but there's no API available for it? That's where Web Scraping comes in, if the data is not made available by the website we can just scrape it from the website itself.

But before we dive in let us first define what web scraping is. According to Wikipedia:

{% blockquote %} Web scraping (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs simulate human exploration of the World Wide Web by either implementing low-level Hypertext Transfer Protocol (HTTP), or embedding a fully-fledged web browser, such as Internet Explorer or Mozilla Firefox. {% endblockquote %}