Skip to content

Instantly share code, notes, and snippets.

View carlochess's full-sized avatar
🎯
Focusing

Carlos Roman carlochess

🎯
Focusing
View GitHub Profile
@carlochess
carlochess / client.py
Created November 13, 2015 18:53
Proof of concept: UDP broadcasting over a local network
from socket import *
myip = gethostbyname(gethostname())
broadip = inet_ntoa( inet_aton(myip)[:3] + b'\xff' )
addr = (broadip, 34353)
UDPSock = socket(AF_INET, SOCK_DGRAM)
data = u'holii'
@carlochess
carlochess / main.cpp
Last active June 24, 2016 03:51
Prueba para el juez
#include <iostream>
#include <string>
using namespace std;
int main(){
string str;
while(cin >> str)
cout << str << endl;
}
@carlochess
carlochess / App.java
Created April 19, 2016 18:42
Java Pdfbox form filler and inspector example
import java.io.File;
import java.io.IOException;
import java.util.List;
import org.apache.pdfbox.pdmodel.PDDocument;
import org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm;
import org.apache.pdfbox.pdmodel.interactive.form.PDField;
public final class App
{
@carlochess
carlochess / Not_a_single_Colombian
Created July 2, 2017 05:35
Ingenieria de sistemas en Colombia
Not a single Colombian university teaches software engineering. Really. Not a single one.
by ALEX TORRENEGRA on DECEMBER 11, 2014
Software engineering and computer science have played a major role in the most recent innovations that have changed the way we live: rocketry, the Internet, mobile phones, search engines, massive air travel, etc. [1]. In fact, 92% of the largest U.S.-based software companies started since 2003 had a technical co-founder [2]. Any nation that hopes to remain competitive should have great software engineers. As strange as it may sound, there aren’t any universities in Colombia teaching software engineering or computer science. It’s impossible to attend a Colombian university to become a software engineer.
How did Colombia allow this to happen?
For decades, Colombian universities have taught something called “systems engineering.” Systems engineering is “an interdisciplinary field of engineering that focuses on how to design and manage complex engineering systems over their life cy
@carlochess
carlochess / Vagrantfile
Created July 9, 2019 04:57
HTCondor docker centos 7
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.box = "centos/7"
config.vm.provider "virtualbox" do |vb|
@carlochess
carlochess / docker-compose-critical.yml
Created May 11, 2020 00:44
Mutiple docker compose
# /tmp/compose/
version: '3.3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
@carlochess
carlochess / role-policy.json
Created April 16, 2021 15:33
Simple userdata for amazon ec2 instance with session manager
arn:aws:iam::aws:policy/service-role/AmazonEC2RoleforSSM
@carlochess
carlochess / README.md
Created April 16, 2021 15:41
CF Cloudformation template that creates a Cloudfront with OAI to S3 for a frontend SPA
                                                 ┌──────────────────────────────┐
                                                 │                              │
                                  ┌──────┐       │        test/index.html       │
                                  │lambda│       │                              │
                                  │change├───────►                              │
 test.react.app  ┌─────────┐      │origin│       ┌──────────────────────────────┤
 ───────────────►│         ├─────►└──────┴┐      │                              │
                 │cloudfron│              │      │                              │
@carlochess
carlochess / codepipeline-events.yaml
Created June 18, 2021 23:07
AWS Listen for codepipeline events and triggers a lambda (slack notifier)
AWSTemplateFormatVersion: "2010-09-09"
Description: Pipeline
Parameters:
SsmSlackWebHookParam:
Type: String
Description: Slack web hook path from ssm parameter store
Default: "/DEVOPS/SLACKWEBHOOK"
Resources:
PipelineEventsRule:
Type: 'AWS::Events::Rule'
@carlochess
carlochess / mc.sh
Last active August 23, 2021 16:43
minecraft server
#!/bin/bash
mkdir -p $(pwd)/minecraft-data
### other ops
# docker exec -i mc rcon-cli
# -e MEMORY=2G
# -e TYPE=SPIGOT
# -e OVERRIDE_SERVER_PROPERTIES=true ...
# -e SERVER_NAME=MyServer ...