Skip to content

Instantly share code, notes, and snippets.

@carlosh1989
carlosh1989 / uri-segments.php
Created July 30, 2017 02:08 — forked from solepixel/uri-segments.php
Function to parse URI segments.
<?php
function uri($segment=NULL, $qs=false){
$uri = $_SERVER['REQUEST_URI'];
if(!$qs || $segment !== NULL){
if(strpos($uri, '?')){
list($uri, $query) = explode('?', $uri);
}
if($segment !== NULL){
if(is_string($segment)){
if($segment != 'last'){
@carlosh1989
carlosh1989 / bootstrap-tabs.html
Last active August 29, 2015 14:26 — forked from mnewt/bootstrap-tabs.html
bootstrap tabs example
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Le styles -->
<link href="../bootstrap/css/bootstrap.css" rel="stylesheet">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.js"></script>
</head>
<body>
<snippet>
<content>
<![CDATA[
public function ${2:seccion}_${3:vista}()
{
${1:this}->recursos->theme('${4:perfil}','${2:seccion}','${3:vista}','');
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>crearv</tabTrigger>