Skip to content

Instantly share code, notes, and snippets.

View wfpaisa's full-sized avatar

Felipe Uribe wfpaisa

View GitHub Profile
@wfpaisa
wfpaisa / changewallpaper
Created July 17, 2019 01:18
Change wallpaper at night gnome cron
#!/bin/bash
#
# Cron
#
# 1. Create a file call it `/home/USER/changewallpaper` whit all this content
# 2. Execute with `chmod +x /home/USER/changewallpaper`
# 3. Create or edit the cron with `crontab -e`
# 4. add `0 * * * * /home/USER/changewallpaper`
#
# where (minute|hour|day-month|month|week) chek https://crontab.guru/
@wfpaisa
wfpaisa / .eslint.js
Last active March 9, 2019 19:06
ESLINT
// FOR VUE
module.exports = {
"root": true,
"extends": [
"plugin:vue/recommended", // ver-> https://alligator.io/vuejs/vue-eslint-plugin/
// "plugin:prettier/recommended",
"eslint:recommended"
],
"rules": {
// Disallow the use of debugger
// Place your key bindings in this file to override the defaults
// https://code.visualstudio.com/docs/editor/userdefinedsnippets#_assign-keybindings-to-snippets
[
// Comentarios
// {
// "key": "ctrl+l",
// "command": "editor.action.insertSnippet",
// "args": {
// "name": "console_log"
// }
@wfpaisa
wfpaisa / index.php
Created September 11, 2017 20:52
TCC envios Colombia simple webservice
<?php
$url = "http://clientes.tcc.com.co/servicios/liquidacionacuerdos.asmx?wsdl";
/* Initialize webservice TCC WSDL */
$client = new SoapClient($url);
/* Get TCC functions and types functions */
// print_r($client->__getFunctions());
// print_r($client->__getTypes());
@wfpaisa
wfpaisa / Node.sublime-build
Created June 28, 2016 14:57
Ejecutar nodeJS en sublime text3
{
"cmd": ["/usr/local/bin/node", "$file"],
"selector": "source.js",
"windows": {
"shell": true
}
}
@wfpaisa
wfpaisa / settings.txt
Last active April 26, 2016 01:26
Bracktes theme
care bear stare , Material theme
16px
monaco
@wfpaisa
wfpaisa / listenkbd.py
Last active April 21, 2016 03:35
screenkey linux personalizando, permitiendo solo comando y agregando el texto espacio en blanco: /lib/python2.7/site-packages/Screenkey
# Copyright (c) 2010 Pablo Seminario <pabluk@gmail.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

####Convertir canvas imagen a datauri, sera ya el formulario para enviar

para un canvas,donde canvas es el objecto que contiene la imagen fd es el formulario:

var dataURL = canvas.toDataURL('image/jpeg', 0.5);
var blob = dataURItoBlob(dataURL);
var fd = new FormData(document.forms[0]);
fd.append("canvasImage", blob);
```
para un base64, donde **Base64** es el string base64 con la imagen y **fd** es el formulario:

archivo: ~/.atom/snippets.cson

'*':
   'Traduccion Cakephp con php':
      'prefix': 'phptra'
      'body': '<?php echo \$translations[\'${1:this}\']; ?>${2}'

   'Traduccion Cakephp':
      'prefix': 'tra'