Skip to content

Instantly share code, notes, and snippets.

Iván Cabrera sanPuerquitoProgramador

Block or report user

Report or block sanPuerquitoProgramador

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
sanPuerquitoProgramador / Romina.php
Last active Jun 13, 2018
Library for CI; The common taks for development
View Romina.php
<?php defined('BASEPATH') OR exit('No direct script access allowed');
Class Romina{
public function __construct()
setlocale(LC_TIME, 'es_ES');
sanPuerquitoProgramador / BaseModel.php
Last active Feb 11, 2018
Base Model for CodeIgniter. It's assumes your tables has crated_at and updated_at fields. The Insert and Update functions fill and updated those fields automatically
View BaseModel.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Base_model extends CI_Model{
* { function_description }
function __construct()
sanPuerquitoProgramador / hiddenfiles
Last active Jan 12, 2018
Script para mostrar y ocultar los archivos ocultos de la mac. Muy util cuando trabajas con .htaccess y otros archivos
View hiddenfiles
display dialog "Archivos ocultos" buttons {"Mostrar", "Ocultar"}
set result to button returned of result
if result is equal to "Mostrar" then
do shell script "defaults write AppleShowAllFiles -boolean true"
do shell script "defaults delete AppleShowAllFiles"
end if
do shell script "killall Finder"
sanPuerquitoProgramador / .htaccess
Created Jun 12, 2017
htaccess for CodeIngniter projects
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
sanPuerquitoProgramador / Update remote repo
Last active Jan 26, 2017 — forked from mandiwise/Update remote repo
Transfer repo from Bitbucket to Github
View Update remote repo
// Reference:
// See also:
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin
$ git push --set-upstream origin master
$ git remote rm bitbucket
View ci_url_helper.js
/* simple snippet for create Code Igniter base_url() and site_url() in JavaSCript */
<script type="text/javascript">
var js_site_url = function( urlText ){var urlTmp = "<?php echo site_url('" + urlText + "'); ?>";return urlTmp;}
var js_base_url = function( urlText ){var urlTmp = "<?php echo base_url('" + urlText + "'); ?>";return urlTmp;}
/* e.g. use in js in the same way use in PHP Code Igniter*/
You can’t perform that action at this time.