Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/images/splash.jpg" type="image/x-icon">
@Davidzn2
Davidzn2 / git-commit-emojis.md
Created August 19, 2019 19:53 — forked from jhermann/git-commit-emojis.md
Useful emoji for git commit messages

Useful emoji for git commit messages

If you add emoji to your commit messages for a GitHub repo, they become less boring, and you can convey the kind of change you're adding. See the full set of GitHub supported emoji here (also useful for easy copy&paste via a simple click).

Example commit message

The following is a possible scheme to use:

// Write a function in JavaScript called `humanSize`
// that takes a non-negative number of `bytes` and
// returns a string with the equivalent number of
// 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', or 'YB',
// between [0, 1000), with at most 1 digit of precision
// after the decimal. For example, your function might
// return '107.3MB'.
humanSize = (bytes) => {
class Charmander(object):
def __init__(self, tipo, ataque, color):
self.tipo = tipo
self.ataque = ataque
self.color = color
class Charizard(Charmander):
def __init__(self, tipo, ataque, color, tamanio):
Charmander.__init__(self,tipo, ataque, color)
self.tamanio = tamanio
from random import randint
eleccion_maquina = randint(1,3)
eleccion_persona = input("Ingrese, 1 es piedra \n 2 es papel \n 3 es tijera ")
print "Maquina " + str(eleccion_maquina)
print "TU " + str(eleccion_persona)
if eleccion_maquina == 1 and eleccion_persona == 2:
print "Ganaste!!"
elif eleccion_maquina == 1 and eleccion_persona == 3:
@Davidzn2
Davidzn2 / web-servers.md
Created July 5, 2016 01:13 — forked from jerolan/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
# -*- coding: utf-8 -*-
countrylist = ['Afganistán', 'Albania', 'Alemania', 'Andorra', 'Angola', 'Anguilla', 'Antártida',
'Antigua y Barbuda', 'Antillas Holandesas', 'Arabia Saudí', 'Argelia', 'Argentina', 'Armenia',
'Aruba', 'Australia', 'Austria ', 'Azerbaiyán ', 'Bahamas ', 'Bahrein ', 'Bangladesh ', 'Barbados ',
'Bélgica ', 'Belice ', 'Benin ', 'Bermudas ', 'Bielorrusia ', 'Birmania ', 'Bolivia ',
'Bosnia y Herzegovina ', 'Botswana ', 'Brasil ', 'Brunei ', 'Bulgaria ', 'Burkina Faso ',
'Burundi ', 'Bután ', 'Cabo Verde ', 'Camboya ', 'Camerún ', 'Canadá ', 'Chad ', 'Chile ',
'China ', 'Chipre ', 'Ciudad del Vaticano (Santa Sede) ', 'Colombia ', 'Comores ', 'Congo ',
'Congo, República Democrática del ', 'Corea ', 'Corea del Norte ', 'Costa de Marfíl ',
//: Playground - noun: a place where people can play
import UIKit
var numeros = 0...100
for numero in numeros{
switch numero{
case 30...40:
print( "#\(numero) Viva Swift!!!")
import random
songs=[
'Bohemian Rhapsody.mp3',
'Viva la Vida.mp3',
'Smells like Teen Spirit.mp3',
'I love you.mp3',
'Other song.mp3',
]
playlist =[
def strings():
string = (raw_input('Str '))
set = (raw_input('set '))
for i in (string):
for y in set:
if i == y:
print "The index of the appereance is: " + str(string.index(i))
strings()