Skip to content

Instantly share code, notes, and snippets.


Allan Ramirez ahrherrera

View GitHub Profile
View principal.ts
this.platform.resume.subscribe((res) => {
if(this.resumed == false){
//your logic goes here
console.log("User updated successfully");
if (this.auth.userdata.afiliado.bloqueado) {
title: "Su usuario está bloqueado",
subTitle: "Mientras su usuario está bloqueado, no puede recibir ni aceptar órdenes. <br><br> Si cree que es un error, contáctese con soporte."
ahrherrera / cloudSettings
Last active May 31, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
View router.js
const multer = require('multer');
const picStorage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, 'public/images'); // carpeta donde guardara los ficheros
filename: function (req, file, cb) {
cb(null, Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15) + file.originalname);
//El nombre como quedara el archivo guardaro (Aca genero un string aleatorio para en caso que no se repitan los filenames)
View Query Contractor Search
ahrherrera / file.json
Created Feb 25, 2019
RAW update User
View file.json
"apt_unit": "9282727",
"city": "Managua",
"dob": "2003-02-25",
"email": "",
"first_name": "Allan",
"gender": 0,
"goals": null,
"last_name": "Ramirez",
"password": "allan1097",
View QUERY.sql
--Stored Procedure: [dbo].[sp_Search]
Select as 'ProfileID',
pro.first_name as 'FirstName',
pro.last_name as 'LastName', as 'Email', as 'Phone', as 'Sport',
pro.score as 'Score',
View account.js
const mailOptions = {
from: '', // sender address
to:, // list of receivers
subject: 'Thank you for purchasing Premium Account', // Subject line
html: `<p style="Margin-top: 0;Margin-bottom: 20px;text-align: center;"><span style="color:#000">We've charged &nbsp;<strong>$1.99</strong> to activate The Free Agent Premium account.<br /><br />- The Free Agent Team</span></p>` // plain text body
transporter.sendMail(mailOptions, function(err, info) {
if (err)
View variables.general.ts
export const SERVER_URL = '';
// export const SERVER_URL = 'http://localhost:9000';
export const states = [
"name": "Alabama",
"abbreviation": "AL"
"name": "Alaska",
ahrherrera / app.js
Last active Feb 5, 2019
Multer file upload
View app.js
var express = require("express");
var router = express.Router();
var accountModel = require("../models/account/account"); // gf
const multer = require('multer');
// FileUpload Setup
const storage = multer.diskStorage({
destination: function(req, file, cb) {
//Directorio donde guardar imagen
ahrherrera / CalculoChik.bas
Created Oct 24, 2018
Interpretar codigo fuente. Ver comentarios
View CalculoChik.bas
ReDim Preserve arrayCodigos(1)
arrayCodigos(0) = "Codigos"
Set ElisaCnn = New Connection
ElisaCnn.Open "PROVIDER=MSDASQL;dsn=ELISA;uid=;pwd=datosElisaCNDR;"
Set rsElisa = New Recordset
rsElisa.Open "Select * from DatosProtocoloChik", ElisaCnn, adOpenDynamic, adLockOptimistic
For i = 0 To 95
If Not frmMain.txtProtocolo(i).Text Like "SINM*" Then
You can’t perform that action at this time.