Skip to content

Instantly share code, notes, and snippets.

View armonge's full-sized avatar
🏠

Andrés Reyes Monge armonge

🏠
View GitHub Profile
@armonge
armonge / requirements.txt
Last active September 27, 2017 01:11
Gets the list of all urls in a website, outputs a CSV with url, title. Uses python3
beautifulsoup4==4.3.2
requests==2.3.0
{
"intents": [
{
"intent": "LaunchIntent"
},
{
"intent": "AMAZON.NoIntent"
},
{
"intent": "SumIntent",
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# open new tabs in same directory
source /etc/profile.d/vte.sh
"""
String Calculator
1- The program can take 0, 1 or 2 numbers and will
return their sum, (for an empty string it will return 0)
for example "" or "1" or "1,2" -> 0, 1, 3
2- Allow the Add method to handle an unknown amount
of numbers
def fizzbuzz(number)
if number == 0
return '0'
elsif number % 15 == 0
return 'fizzbuzz'
elsif number % 3 == 0:
return 'fizz'
elsif number % 5 == 0:
return 'buzz'
end
function fizzbuzz(number){
if(number === 0){
return '0';
}
if(number % 3 === 0 && number % 5 === 0){
return 'fizzbuzz';
}
if(number % 3 === 0){
<?php
class FizzBuzz
{
static public function categorize($num) {
$result = '';
if($num === 0){
return '0';
}
def fizzbuzz(num):
if num == 0:
return '0'
if num % 3 == num % 5 == 0:
return 'fizzbuzz'
if num % 3 == 0:
return 'fizz'
@armonge
armonge / whois.py
Last active December 15, 2015 23:09
Simple whois server
import os
import sqlite3 as sqlite
import socket
HOST = ''
PORT = 1043
BUFSIZE = 1024
ADDR = (HOST,PORT)
WORKDIR = '/home/armonge/tmp/whois-python/'
@armonge
armonge / .gtkrc-2.0
Created October 18, 2012 02:44
Monospaced fonts in pidgin
style "imhtml-fix"
{
font_name = "Monospace 8"
}
# Conversation entry box--where you type.
widget "*pidgin_conv_entry" style "imhtml-fix"
# Conversation history pane--where you read the conversation.
widget "*pidgin_conv_imhtml" style "imhtml-fix"