// jQuery
$(document).ready(function() {
// code
})
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diskutil eraseDisk JHFS+ nombre /dev/disk# | |
Started erase on disk# | |
Unmounting disk | |
Error: -69760: Unable to write to the last block of the device | |
-> | |
fdisk -i /dev/disk# | |
diskutil umountDisk /dev/disk# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="my-5"> | |
Breakpoint actual: | |
<span class="badge badge-primary d-inline d-sm-none">xs</span> | |
<span class="badge badge-primary d-none d-sm-inline d-md-none">sm</span> | |
<span class="badge badge-primary d-none d-md-inline d-lg-none">md</span> | |
<span class="badge badge-primary d-none d-lg-inline d-xl-none">lg</span> | |
<span class="badge badge-primary d-none d-xl-inline">xl</span> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
// Calculo para hacer la boleta: [valor_a_recibir]*1.1111111111111112 | |
var montoLiquido = 660000; | |
var impuesto = (montoLiquido*1.1111111111111112)-montoLiquido; | |
var montoBoleta = montoLiquido*1.1111111111111112; | |
document.write("Monto a recibir: $"+montoLiquido); | |
document.write("<br />"); | |
document.write("Impuesto: $"+parseInt(impuesto)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public $default = [ | |
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock', | |
'DSN' => '', | |
'hostname' => '127.0.0.1', | |
'username' => 'root', | |
'password' => 'root', | |
'database' => 'XXX', | |
'DBDriver' => 'MySQLi', | |
'DBPrefix' => '', | |
'pConnect' => false, |
Every time I start a new project, I want to pull in a log
function that allows the same functionality as the console.log
, including the full functionality of the Console API.
There are a lot of ways to do this, but many are lacking. A common problem with wrapper functions is that the line number that shows up next to the log is the line number of the log function itself, not where log
was invoked. There are also times where the arguments get logged in a way that isn't quite the same as the native function.
This is an attempt to once and for all document the function that I pull in to new projects. There are two different options:
- The full version: Inspired by the plugin in HTML5 Boilerplate. Use this if you are writing an application and want to create a window.log function. Additionally,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Añadir class según breakpoint al body | |
*/ | |
var breakpoint = (function(body) { | |
let bp_cur = ""; | |
var bp_dom = { | |
get: function (o) { var obj = Object.create(this); obj.element = (typeof o == "object") ? o : document.createElement(o); return obj; }, | |
app: function (o) { var obj = bp_dom.get(o); this.element.prepend(obj.element); return obj; }, | |
att: function (k, v) { this.element.setAttribute(k, v); return this; }, | |
cls: function (c) { this.element.className = c; return this; }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function toSlug(str) { | |
str = str.replace(/^\s+|\s+$/g, ''); | |
str = str.toLowerCase(); | |
var from = "ãàáäâẽèéëêìíïîõòóöôùúüûñç·/_,:;"; | |
var to = "aaaaaeeeeeiiiiooooouuuunc------"; | |
for (var i=0, l=from.length ; i<l ; i++) { str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); } | |
str = str.replace(/[^a-z0-9 -]/g, '').replace(/\s+/g, '-').replace(/-+/g, '-'); return str; | |
} | |
// Itera sobre objeto para agregar propiedad 'slug', basandose en propiedad 'nombre' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fixPrecio($number, $showsign=true){ | |
$showsign = !$showsign ? "" : "$"; | |
return $showsign.number_format($number, 0, '.', '.'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CONTENIDO DEL ARCHIVO /etc/postfix/main.cf | |
#myorigin = /etc/mailname | |
biff = no | |
append_dot_mydomain = no | |
#delay_warning_time = 4h | |
readme_directory = no | |
compatibility_level = 2 | |
# TLS parameters |
OlderNewer