Skip to content

Instantly share code, notes, and snippets.

View ksprwhite's full-sized avatar

Jonathan Andres ksprwhite

View GitHub Profile
@ksprwhite
ksprwhite / t_bbcode_plus_plus.js
Last active October 4, 2015 22:30
T! bbcode ++
// ==UserScript==
// @name T! bbcode ++
// @namespace lincecode
// @include /^http:\/\/([w]{3}\.)?taringa.net[^$]*$/
// @version 1
// @grant none
// ==/UserScript==
$(document).ready(function () {
'use strict';
var FileUploader = (function($global) {
var defaults = {
'wrapperStyle': '',
'url': null,
'chooseText': 'Seleccionar archivos'
},
context = null;
function Uploader(element, settings) {
@ksprwhite
ksprwhite / bs-validation.js
Last active February 26, 2018 23:28
bootstrap validation | nav-tabs
var FormValidation = (function($) {
var context = null;
function FormValidation(form) {
this.form = $(form);
this.tabs = $(form).find('.nav-tabs a[role="tab"]');
this.panels = $(form).find('.tab-content [role="tabpanel"]');
@ksprwhite
ksprwhite / index.php
Last active April 17, 2018 23:45
matrix to .txt
<?php
$matrix = generateMatrix(20, 20);
$homePath = (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN'
? $_SERVER['HOMEDRIVE'] . $_SERVER['HOMEPATH']
: $_SERVER['HOME']);
$filename = $homePath . '\\matrix.txt';
$file = fopen($filename, 'w') or die('imposible escribir en ' . $filename);
$content = '';