Skip to content

Instantly share code, notes, and snippets.

View stivenson's full-sized avatar
🏠
Working from home

Stivenson stivenson

🏠
Working from home
View GitHub Profile
@stivenson
stivenson / Image.php
Last active June 22, 2020 14:03
Clase php para operaciones sobre una imagen en base64 o en Archivo
<?php
namespace Helpers; // Optional
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
@stivenson
stivenson / OperationsDate.php
Created April 26, 2016 19:43
Clase para operaciones sobre fechas
<?php
namespace Helpers;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*
*/
@stivenson
stivenson / fillfortesting.js
Last active August 12, 2016 17:13 — forked from jonkemp/prepopulate.html
Fill your forms with random data. For testing forms. Requires jQuery.
$( function() {
$('form').find('input:text').val( function(i, val) {
return randomText();
});
$('form').find('input[type="number"]').val( function(i, val) {
return randomInt();
});
@stivenson
stivenson / c_p_jdbc.java
Created February 15, 2017 15:17
Conection Postgresql with jdbc
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.sql.rowset.CachedRowSet;
import com.sun.rowset.CachedRowSetImpl;
/**
*
* @author beastieux
*/
@stivenson
stivenson / c_m_jdbc.java
Created February 15, 2017 15:21
Conection mysql with jdbc
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.sql.rowset.CachedRowSet;
import com.sun.rowset.CachedRowSetImpl;
/**
*
* @author beastieux
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@stivenson
stivenson / 1-sleep-es7.js
Created May 1, 2017 02:40 — forked from danharper/1-sleep-es7.js
ES7's async/await syntax.
// ES7, async/await
function sleep(ms = 0) {
return new Promise(r => setTimeout(r, ms));
}
(async () => {
console.log('a');
await sleep(1000);
console.log('b');
})()
@stivenson
stivenson / account.js
Created May 12, 2017 16:07 — forked from fernandez14/account.js
Mithril 1.x component example.
import m from 'mithril';
import stream from 'mithril/stream';
import {Button} from '../../ui';
import {Account} from '../../models';
export const FormAccountPublicPage = {
oninit(vnode) {
this.loading = true;
this.saving = false;
this.errors = false;
@stivenson
stivenson / app.js
Created May 13, 2017 06:30 — forked from tobyzerner/app.js
Mithril ES6 Components
import Component from './component';
class Widget extends Component {
init(ctrl) {
var props = this.props;
ctrl.counter = props.initialValue;
ctrl.increment = function() {
ctrl.counter++;
@stivenson
stivenson / flicker.css
Created December 23, 2017 20:38
Flicker color on div
.background-flicker {
background-color: #FFF;
animation: flicker 2s;
-webkit-animation: flicker 2s;
-moz-animation: flicker 2s;
animation-iteration-count: infinite;
-webkit-animation-iteration-count: infinite;
-moz-animation-iteration-count: infinite
}