Skip to content

Instantly share code, notes, and snippets.

View neosergio's full-sized avatar
🤓
Happy Coding!

Sergio Infante neosergio

🤓
Happy Coding!
View GitHub Profile
@neosergio
neosergio / PY0101EN-2-2-Lists.ipynb
Created July 15, 2019 20:02
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neosergio
neosergio / PY0101EN-2-1-Tuples.ipynb
Created July 15, 2019 19:55
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neosergio
neosergio / PY0101EN-1-2-Strings.ipynb
Created July 7, 2019 14:55
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neosergio
neosergio / PY0101EN-1-1-Types.ipynb
Created July 1, 2019 22:01
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
python -c 'import random; result = "".join([random.choice("abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)") for i in range(50)]); print(result)'
#Install Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Legitimately-useful utilities missing from OS X.
brew install wget watch gnu-sed coreutils unrar
# Up-to-date versions of included tools.
brew install git emacs
# Just for fun.
@neosergio
neosergio / reinstall-mbanking.sh
Last active August 29, 2015 14:05
Bash script to quick reinstall of a mbanking server
#!/bin/bash
cd ~
rm *.property*
wget https://gist.githubusercontent.com/neosergio/76b91816239f9cdab3d8/raw/74112f73280d9ce339fb32e3be30f169ccb2f252/mbanking-database-install.property
wget https://gist.githubusercontent.com/neosergio/6ab217e00fde9380c219/raw/b3c1d781585f1ea2eaee94c73ee9cd9972a61fd9/mbanking-configuration-install.property
wget https://gist.githubusercontent.com/neosergio/790f851cce9785815fd5/raw/aa109702a9ecfb7db22306f9a2d2d94f1568af20/mbanking-server-install.property
wget https://gist.githubusercontent.com/neosergio/87df7af335a65912fadc/raw/fafc8477fcc17f54c916c36a26330a1ed577cb61/mb-testharness-database.property
wget https://gist.githubusercontent.com/neosergio/8c218258c1e28e4c43dc/raw/3f21574ae03da2cac58dc6285aada88dd83eb9a6/mb-testharness-server.property
while getopts ":m:f:d" opt; do
case $opt in
@neosergio
neosergio / imagen_en_contenedor.rb
Last active January 1, 2016 16:39
Jugando con Ruby: Algoritmo simple sobre un contenedor y una imagen que se ajusta al tamaño del contenedor dinamicamente
puts "De las siguientes opciones del tamaño del contenedor"
puts "1 - Ancho contenedor 200 - Alto contenedor 100"
puts "2 - Ancho contenedor 100 - Alto contenedor 200"
puts "3 - Dejame ingresar los valores manualmente del contenedor"
print "Elija su preferencia: "
STDOUT.flush
opcion = gets.to_i
if opcion == 1
ancho_contenedor = 200
alto_contenedor = 100
@neosergio
neosergio / script-magico.sh
Last active December 21, 2015 21:29
example of a small script to install an specific environment for a project
#update the operating system
sudo apt-get update --yes
sudo apt-get upgrade --yes
sudo apt-get dist-upgrade --yes
#this is for using our active directory
sudo apt-get install likewise-open5 --yes
#tasksel magic
sudo apt-get install tasksel --yes
@neosergio
neosergio / virtualenwrapper-profile
Last active December 19, 2015 17:28
This is useful when you want to have many versions of python libraries, you can add this lines into ~/.profile
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/directory-you-do-development-in
source /usr/local/bin/virtualenvwrapper.sh