Skip to content

Instantly share code, notes, and snippets.

View agodin3z's full-sized avatar
🍻
Working hard~

Andrés Godínez agodin3z

🍻
Working hard~
View GitHub Profile
@agodin3z
agodin3z / hexo-logo.svg
Last active September 25, 2015 00:00
Logo vectorizado de Hexo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agodin3z
agodin3z / mozillasv-logo.svg
Created September 25, 2015 01:39
Logo de Mozilla El Salvador - Web: http://bit.ly/1izsI8d - Licence: http://bit.ly/1Mt9tHy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agodin3z
agodin3z / importar-json.py
Created September 25, 2015 01:45
Simple script python para importar datos de un .json a una db de mongodb
#!/usr/bin/python
from pymongo import *
import json
print "\nSe conectara al Servidor de Base de Datos Local."
conexion = Connection() #La conexion sera local
#Variable de referencia de la base de datos.
ndb = raw_input("\nIngrese el nombre de la base de datos: ")
db = conexion[ndb] #Conexion a la db
<!-- Schema.org markup for Google+ -->
<meta itemprop="name" content="site name">
<meta itemprop="description" content="descripcion max 155 caracteres">
<meta itemprop="image" content="imagen">
<!-- Twitter Cards -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@usuario" />
<meta name="twitter:title" content="titulo" />
<meta name="twitter:description" content="descripcion max 140 caracteres" />
@agodin3z
agodin3z / media_queries.css
Created January 17, 2016 00:04
Media queries for standard devices
/* ----------------------------------------------- */
/* ------------------- Laptops ------------------- */
/* ----------------------------------------------- */
/* ----------- Laptops Non-Retina Screens ----------- */
@media screen
and (min-device-width: 1200px)
and (max-device-width: 1600px)
and (-webkit-min-device-pixel-ratio: 1) {
}
@agodin3z
agodin3z / SistemaPedidos.cpp
Last active November 17, 2020 01:48
Simple sistema de pedidos
#include <iostream>
#include <stdlib.h>
#include <cstdlib>
#include <string.h>
using namespace std;
// Varibles Globales
int error = 0, salir = 0, atras = 1;
string admUser="admin", admPass="54321", cajUser="cajero", cocUser="cocina", usrPass="12345";
@agodin3z
agodin3z / Login.cpp
Last active November 17, 2020 01:49
Simple Login with Cpp - Linux y Windows
#include <iostream>
#include <stdlib.h>
#include <string>
#ifdef WINDOWS
#include <windows.h>
#else
// Assume POSIX
#include <termios.h>
#include <unistd.h>
#endif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agodin3z
agodin3z / sequelize-migration-file-generator.js
Last active June 16, 2023 08:13 — forked from manuelbieh/sequelize-migration-file-generator.js
Creates migration files for existing sequelize models [custom]
#!/usr/bin/env node
const fs = require('fs');
const models = require('../models');
for (const model in models) {
const tableName = models[model].tableName;
let defaultValue = '';
let onUpdate = '';
@agodin3z
agodin3z / isValidUrl.js
Created October 19, 2020 15:31
Check if the string is a valid URL
const isValidUrl = (url) => {
const regex = new RegExp(/(http(s)?:\/\/.)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&//=]*)?/gi);
return url.match(regex);
};