Skip to content

Instantly share code, notes, and snippets.

@ksprwhite
ksprwhite / index.php
Last active Apr 17, 2018
matrix to .txt
View index.php
<?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 = '';
@ksprwhite
ksprwhite / bs-validation.js
Last active Feb 26, 2018
bootstrap validation | nav-tabs
View bs-validation.js
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"]');
View FileUploader.js
var FileUploader = (function($global) {
var defaults = {
'wrapperStyle': '',
'url': null,
'chooseText': 'Seleccionar archivos'
},
context = null;
function Uploader(element, settings) {
View t_bbcode_plus_plus.js
// ==UserScript==
// @name T! bbcode ++
// @namespace lincecode
// @include /^http:\/\/([w]{3}\.)?taringa.net[^$]*$/
// @version 1
// @grant none
// ==/UserScript==
$(document).ready(function () {
'use strict';
You can’t perform that action at this time.