Skip to content

Instantly share code, notes, and snippets.

View oscarmcm's full-sized avatar
🐍
Pythonista

Oscar Cortez oscarmcm

🐍
Pythonista
View GitHub Profile
#include <iostream>
#include <conio.h>
#include <cmath>
#include <cstdlib>
#include <time.h>
#include <ctime>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
@oscarmcm
oscarmcm / designer.html
Last active August 29, 2015 14:08
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@oscarmcm
oscarmcm / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../paper-calculator/paper-calculator.html">
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
{
"name": "HelloWorld",
"author": "Oscar Cortez",
"version": "0.0.1",
"description": "Agenda Sample Application",
"dependencies": {
"agenda": "*"
},
"engine": "node 0.10.x"
}
@oscarmcm
oscarmcm / encript.cpp
Last active August 29, 2015 14:04
simple encripter in c/c++
//encriptador en c++
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <ctype.h>
#include <conio.c>
#include <iostream>
using namespace std;
void EscribirEncrypt();
@oscarmcm
oscarmcm / cripty.py
Created July 2, 2014 04:11
simple encripter in python
#!/bin/python
# -*- coding:UTF-8 -*-
import sys, base64, hashlib, hmac
from string import maketrans
#Codificacion con maketrans
MtuX=maketrans("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789","mab1c2z3k4h5f6s7p8i9y0rewqQW]RT[UI$%A(D-G)JK Z#CVB/M@&\*.;_^{}")
#Decodificación con makeTrans
Mtux=maketrans("mab1c2z3k4h5f6s7p8i9y0rewqQW]RT[UI$%A(D-G)JK Z#CVB/M@&\*.;_^{}","abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
@oscarmcm
oscarmcm / mock.xml
Created March 30, 2014 02:39
mockup for flisol managua http://webdemo.balsamiq.com/
<mockup version="1.0" skin="sketch" fontFace="Balsamiq Sans" measuredW="1456" measuredH="1313" mockupW="1318" mockupH="1302">
<controls>
<control controlID="36" controlTypeID="com.balsamiq.mockups::BrowserWindow" x="138" y="11" w="1025" h="1302" measuredW="450" measuredH="400" zOrder="1" locked="false" isInGroup="-1">
<controlProperties>
<text>Flisol%20Managua%0Ahttp%3A//flisolmga.linuxtour.org</text>
</controlProperties>
</control>
<control controlID="38" controlTypeID="com.balsamiq.mockups::Canvas" x="824" y="951" w="310" h="244" measuredW="100" measuredH="70" zOrder="2" locked="false" isInGroup="-1"/>
<control controlID="39" controlTypeID="com.balsamiq.mockups::Map" x="853" y="962" w="-1" h="-1" measuredW="252" measuredH="222" zOrder="3" locked="false" isInGroup="-1"/>
<control controlID="40" controlTypeID="com.balsamiq.mockups::Canvas" x="167" y="951" w="310" h="244" measuredW="100" measuredH="70" zOrder="4" locked="false" isInGroup="-1"/>
@oscarmcm
oscarmcm / index.html
Created March 24, 2014 22:00
A Pen by Oscar Martin Cortez Martinez.
<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/es_ES/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-post" data-href="https://www.facebook.com/media/set/?set=a.651394768231859.1073741833.442498065788198&amp;type=1" data-width="470"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/media/set/?set=a.651394768231859.1073741833.442498065788198&amp;type=1">una publicación</a> de <a href="https://www.facebook.com/pages/GUL-UCA/442498065788198">GUL-UCA</a>.</div></div>
@oscarmcm
oscarmcm / corazon.css
Last active January 2, 2016 12:19
Un Corazon En CSS3
.corazon {
position: relative;
width: 100px;
height: 90px;
margin:0 auto;
}
.corazon::before, .corazon::after {
position: absolute;
content: "";
@oscarmcm
oscarmcm / Reducirimagenes3.rb
Last active December 31, 2015 16:49
Reduce el tamao de la imagenes
require 'rubygems'
require 'RMagick'
# get the folder containing the original images
folder = ARGV[0]
# reduce by 35% = 35/100
scale_by = 0.35
# Get the images in the folder