Skip to content

Instantly share code, notes, and snippets.

View intelguasoft's full-sized avatar
馃彫
Working from at wharehouse of PROFAR...

Henry D铆az intelguasoft

馃彫
Working from at wharehouse of PROFAR...
View GitHub Profile
@intelguasoft
intelguasoft / README.md
Created May 28, 2019 22:01
Documentaci贸n para el plugin printThis.js

npm version

printThis

Printing plug-in for jQuery

Features

  • Print specific & multiple DOM elements
@intelguasoft
intelguasoft / return_data_json.js
Created May 28, 2019 22:06
Metodo para procesar la data de una determinada hoja de un archivo de Excel y devolverla en formato JSON.
/**
* Metodo para procesar la data de una determinada hoja de un archivo de Excel y devolverla en formato JSON.
* Se utilizo la librer铆a SheetJS para este ejemplo.
* Henry D铆az, <[email protected]>
**/
$('#btn-importar').on('click', function(e) {
e.preventDefault();
$('#movimiento').show();

Windows Forms: Como encriptar/desencritar la cadena de conexi贸n en el archivo app.config usando C#

Esta nota te muestro c贸mo cifrar y descifrar la cadena de conexi贸n en el archivo app.config en una aplicaci贸n de Windows Forms de C# .Net

Puede usar muchos algoritmos diferentes para cifrar y descifrar una cadena de texto. Sin embargo, dentro del alcance de este art铆culo, solo le muestro c贸mo usar el algoritmo TripleDes para cifrar y descifrar su cadena de conexi贸n.

La cadena de conexi贸n generalmente se almacena en app.config y rara vez se cifra. Si alguien abre el archivo app.config, ver谩 la informaci贸n de conexi贸n del servidor de datos. Esto es muy peligroso si inician sesi贸n en la base de datos para sabotear o editar datos sin usar software.

Por lo tanto, el cifrado de la cadena de conexi贸n es esencial, le ayuda a proteger la informaci贸n de conexi贸n a la base de datos.

var http = require('http');
var path = require('path');
var fs = require('fs');
var AUDIOFILE = "./audio.ogg";
function serveWithRanges(request, response, content) {
var range = request.headers.range;
var total = content.length;
var parts = range.replace(/bytes=/, "").split("-");
@intelguasoft
intelguasoft / blur.js
Created February 15, 2020 02:01
fast black and white gaussian blur on canvas in js
/* vertical blur of blur_px. for efficiency, we copy a vertical
* line to a buffer so that access are made in a cache efficient
* manner */
function vblur(b, blur_px) {
var buf = new Uint8ClampedArray(h * 4);
for (var vertical = 0; vertical < w; vertical++) {
copy_vertical_in_buffer(b, vertical, buf);
blur_scanline(buf, 0, h, blur_px);
@intelguasoft
intelguasoft / gist:aa133c98be77064bcd5601f7b3ffce98
Created February 15, 2020 02:04
How to save a file from js (from tiddlywiki code)
function mozillaSaveFile(filePath,content)
{
if(window.Components) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
file.initWithPath(filePath);
if(!file.exists())
file.create(0,0664);
var out = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream);
@intelguasoft
intelguasoft / wifi.rb
Created February 15, 2020 02:06
Wifi meter using Shoes
# A tiny wifi meter
# usage : shoes wifi.rb
Shoes.app(:title => "wifi meter", :width => 250, :height => 100) do
background gradient(rgb(0,0,0), rgb(40,40,40))
header = {
:font => 'Georgia',
:size => '48px',
:stroke=>'#'+'E'*3,
@intelguasoft
intelguasoft / .vscode\launch.json
Last active March 1, 2020 03:16
Configuraci贸n de depuraci贸n en Visual Studio Code para Node.js.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Debug ecommerce",
@intelguasoft
intelguasoft / .prettierrc
Last active March 1, 2020 03:16
Configuraci贸n para el complemento (Prettier - Code formatter esbenp.prettier-vscode)
{
"arrowParens": "avoid",
"semi": false,
"singleQuote": true,
"bracketSpacing": true,
"tabWidth": 2
}
@intelguasoft
intelguasoft / package.json
Created February 29, 2020 21:12
Package.json para un proyecto con AdonisJS usando depuraci贸n por medio de VSCode
{
"name": "adonis-api-app",
"version": "4.1.0",
"adonis-version": "4.1.0",
"description": "Adonisjs boilerplate for API server with pre-configured JWT",
"main": "index.js",
"scripts": {
"start": "node server.js",
"dev": "adonis serve --dev --debug",
"test": "node ace test"