Skip to content

Instantly share code, notes, and snippets.

View anchetaWern's full-sized avatar
🏠
Working from home

Wern Ancheta anchetaWern

🏠
Working from home
View GitHub Profile
@anchetaWern
anchetaWern / .htaccess
Created August 28, 2015 04:53
.htaccess
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
@anchetaWern
anchetaWern / newhtml.html
Created September 26, 2012 05:40
html template
<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>
@anchetaWern
anchetaWern / caching.php
Created November 27, 2012 05:34
Laravel Caching
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 December 5, 2012 04:12
Generates database migrations for ums
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 December 6, 2012 03:50
Getting Started with PHP Unit Testing
---
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 December 6, 2012 11:06
Getting Started with Unit Testing in PHP

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 / video-uploader.md
Last active November 22, 2015 12:18
VideoUploader

#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:

@anchetaWern
anchetaWern / file-requester.md
Last active November 22, 2015 12:19
FileRequester

#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:

-- 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";
@anchetaWern
anchetaWern / sp_store.sql
Created April 12, 2016 07:01
sp store database
-- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 12, 2016 at 03:01 PM
-- Server version: 5.6.28-0ubuntu0.15.10.1
-- PHP Version: 5.6.11-1ubuntu3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";