Skip to content

Instantly share code, notes, and snippets.

View emamut's full-sized avatar
💭
💎Harder. 🏆Better. ⚡Faster. 💪🏾Stronger

Faber Andrés Vergara Holguín emamut

💭
💎Harder. 🏆Better. ⚡Faster. 💪🏾Stronger
View GitHub Profile
@emamut
emamut / chosen-bootstrap.css
Last active August 29, 2015 14:13 — forked from koenpunt/chosen-bootstrap.css
CSS for Chosen with Bootstrap
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@emamut
emamut / foo
Last active August 29, 2015 14:08
How to set the terminal to open maximized
The selected answer didn't work for me on fully updated Ubuntu 12.04 LTS, so I decided it was time for a more drastic approach.
Rename original gnome-terminal executable to gnome-terminal-original:
cd /usr/bin
mv gnome-terminal gnome-terminal-original
Create a new file in /usr/bin named gnome-terminal with the following content:
#!/bin/bash
/usr/bin/gnome-terminal-original --maximize $@
@emamut
emamut / index.html
Created July 18, 2014 19:53
Email template
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="viewport" content="width=320, target-densitydpi=device-dpi">
<style type="text/css">
/* Mobile-specific Styles */
@media only screen and (max-width: 660px) {
table[class=w0], td[class=w0] { width: 0 !important; }
table[class=w10], td[class=w10], img[class=w10] { width:10px !important; }
table[class=w15], td[class=w15], img[class=w15] { width:5px !important; }
table[class=w30], td[class=w30], img[class=w30] { width:10px !important; }
table[class=w60], td[class=w60], img[class=w60] { width:10px !important; }
table[class=w125], td[class=w125], img[class=w125] { width:80px !important; }
@emamut
emamut / index.html
Created July 15, 2014 22:42
[HTML] Redirect from HTML page with message
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1;url=http://www.example.com/">
<title>Page Redirection</title>
</head>
<body>
<p>Esta aplicación se encuentra ahora en <a href='http://www.example.com/'>www.example.com</a>, en estos momentos lo estamos redirigiendo...</p>
</body>
@emamut
emamut / zsh.md
Created June 26, 2014 09:46 — forked from tsabat/zsh.md
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH . 'third_party/firephp/lib/FirePHPCore/FirePHP.class.php'; // path to your firephp libs
function fire_print($type, $msg, $optional_label = '')
{
//output only when on development environtment. set on index.php
if (ENVIRONMENT == 'development')
{
@emamut
emamut / environment_setter.php
Last active August 29, 2015 14:02
Codeigniter environment setter - CI Library
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Environment_setter
{
protected $environment_file;
protected $previous_environment;
public function __construct()
{
$this->environment_file = dirname(__FILE__)."/../../index.php";
@emamut
emamut / initializing_jquery_datatables.js
Created June 17, 2014 13:33
Initializing jQuery DataTabless file
$.extend(true, $.fn.dataTable.defaults, {
"bDestroy": false,
"bStateSave": true,
"oLanguage": {
"sLengthMenu": "_MENU_ records per page",
"sProcessing": "Procesando...",
"sLengthMenu": "Mostrar _MENU_ registros",
"sZeroRecords": "No se encontraron resultados",
"sEmptyTable": "Ningún dato disponible en esta tabla",
"sInfo": "Mostrando registros del _START_ al _END_ de un total de _TOTAL_ registros",
@emamut
emamut / loading.js
Created May 28, 2014 16:32
Loading modal window
var myApp;
myApp = myApp || (function () {
var pleaseWaitDiv = $('<div class="modal" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Procesando...</h4> </div> <div class="modal-body"> <div class="progress progress-striped active"> <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemax="100" style="width: 100%;"></div> </div> </div> </div> </div> </div>');
return {
showPleaseWait: function() {
pleaseWaitDiv.modal();
},
hidePleaseWait: function () {
pleaseWaitDiv.modal('hide');
},
@emamut
emamut / data_manipulation_helper.php
Last active August 29, 2015 14:01
Fixture executioner in CI
<?php
if (! function_exists('fixture_executioner'))
{
function fixture_executioner($fixture_path)
{
$ci =& get_instance();
$fixture_restore = $ci->load->file($fixture_path, true);
$fixture_array = explode(';', $fixture_restore);