Skip to content

Instantly share code, notes, and snippets.

View aluevano's full-sized avatar
:octocat:
Delighting customers through Cloud and Digital Transformation

Antonio Luevano aluevano

:octocat:
Delighting customers through Cloud and Digital Transformation
View GitHub Profile
@aluevano
aluevano / cloudSettings
Last active August 14, 2020 06:14
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-14T06:14:26.397Z","extensionVersion":"v3.4.3"}
@aluevano
aluevano / ComputePrimesFunction.cs
Last active September 14, 2019 03:48
Prime Numbers with bit math
public static BitSet computePrimes(int limit)
{
final BitSet primes = new BitSet();
primes.set(0, false);
primes.set(1, false);
primes.set(2, limit, true);
for (int i = 0; i * i < limit; i++)
{
if (primes.get(i))
{
@aluevano
aluevano / BuildTree.cs
Last active September 14, 2019 04:41
Build a Tree and Nodes in C#
Class BuildTree {
static HashMap<Integer,Node> nodes = new HashMap<Integer,Node>();
static Node root = null;
static class Node
{
Node right;
Node left;
Node parent;
int num;
@aluevano
aluevano / docker_with_vmware_install_machine.cmd
Created September 14, 2019 04:53
Install Docker machine in VMware Workstation
docker-machine --debug create --driver=vmwareworkstation --vmwareworkstation-disk-size 4000 --vm wareworkstation-ssh-user user123 --vmwareworkstation-ssh-password password123 --vmwareworkstation-memory-size 1536 machine1
@aluevano
aluevano / Public_Time_Servers.md
Created April 15, 2021 14:50 — forked from mutin-sa/Top_Public_Time_Servers.md
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@aluevano
aluevano / migrate-git-repos.md
Created April 16, 2021 17:33 — forked from dbirks/migrate-git-repos.md
Script to fully migrate git repos, including all tags and branches

Migrate git repos script

I used this for migrating git repos from Bitbucket to Github. It uses git's --mirror flag for cloning and pushing to also transfer all tags and branches.

It would be helpful to have SSH keys set up on both ends. Then all you should have to do is to make sure the hardcoded orgname is set to the appropriate one for both the source and destination.

Once I migrated repos, I used this to replace my origin url locally (assumes using ssh):

sed -i s/bitbucket.org:orgname/github.com:orgname/g .git/config
@aluevano
aluevano / tcpping.md
Created April 19, 2021 21:26
TCP Ping

Creates the ability to trace or "ping" a server using tcp and a port.

$ sudo apt install tcptraceroute $ sudo wget http://www.vdberg.org/~richard/tcpping -O /usr/bin/tcping $ sudo chmod 755 /usr/bin/tcping

@aluevano
aluevano / CONTRIBUTING.MD
Created August 4, 2021 11:37
Contribution Guidelines

Contributing to Genvio Inc.

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We Develop with Github

@aluevano
aluevano / flatten_image.sh
Created October 29, 2021 01:05
Flatten an existing docker image to reduce size
docker run -d --name flat_container nginx
docker export flat_container > flat.tar
cat flat.tar | docker import - flat:latest
docker image history flat
@aluevano
aluevano / HttpServer.cs
Created November 11, 2021 09:52 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;