Skip to content

Instantly share code, notes, and snippets.

@JuanAn-72
JuanAn-72 / README.md
Last active September 22, 2025 15:20 — forked from ruanbekker/README.md
Setup lambda + API Gateway using localstack
@JuanAn-72
JuanAn-72 / suma_digitos_function_based.c
Last active October 16, 2019 21:36
Sum for digits of amount (C language). It adds each individual digit from amount introduced. Example follows Amount = 22456 Sum = 2 + 2 + 4 + 5 + 6 = 19
#include <stdio.h>
int sumadigitos(int cifra){
int suma =0;
int fin =1;
int divisor = 10;
int digito;
do{
digito = cifra%divisor; // leemos el ultimo digito
suma = suma + digito; // acumulamos suma
var dgram = require('dgram'); // dgram is UDP
// Listen for responses
function listen(port) {
var server = dgram.createSocket("udp4");
server.on("message", function (msg, rinfo) {
console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);
});
@JuanAn-72
JuanAn-72 / ssdp.py
Last active August 29, 2015 14:06 — forked from schlamar/ssdp.py
import socket
import struct
import sys
from httplib import HTTPResponse
from BaseHTTPServer import BaseHTTPRequestHandler
from StringIO import StringIO
import gtk
import gobject
@JuanAn-72
JuanAn-72 / ssdp.py
Last active August 29, 2015 14:06 — forked from dankrause/ssdp.py
# Copyright 2014 Dan Krause
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,