Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Wern Ancheta anchetaWern

🏠
Working from home
View GitHub Profile
View .htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
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);
}
@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)

View video-uploader.md

#VideoUploader

Create an application that would allow a user to upload videos to Youtube. The uploaded videos should be searchable. There are 3 types of users that can use the system: admin, content providers & viewers.

The admin is responsible for:

  • creating accounts for uploaders

The uploader is responsible for:

View file-requester.md

#FileRequester

Create an app that would allow the user to request files from users. There are 3 types of users: admin, teacher and student

the admin is responsible for:

  • creating teacher accounts
  • creating students

the teacher is responsible for:

View appointment-notifier.sql
-- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 10, 2015 at 12:31 PM
-- Server version: 5.6.27-0ubuntu1
-- PHP Version: 5.6.11-1ubuntu3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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