Skip to content

Instantly share code, notes, and snippets.

View samuelluis's full-sized avatar

Samuel Luis De La Cruz samuelluis

  • Dominican Rapublic
View GitHub Profile

Como configurar una instancia Ubuntu en Azure para MultiSavings

  1. Creamos un droplet en Digital Ocean usando Ubuntu (la version recomendada por defecto), de 1GB de RAM en adelante.
  2. Iniciamos session ssh root@<ip-de-nuestro-droplet> usando la password que nos envian al email de nuestra cuenta de Digital Ocean.
  3. Nos pedira cambiar la clave, para lo cual digitamos la misma que usamos en el login y luego ponemos la nueva 2 veces.
  4. Una vez dentro realizaremos la siguiente rutina de comandos:
    • Configuraciones del servidor
      • sudo apt-get update
      • sudo apt-get install vim git ssh wget htop curl expect
  • git clone https://gist.github.com/f81080448563100675c754ec3ecb3483.git
@samuelluis
samuelluis / extract-tuanimeligero.bat
Last active July 9, 2019 19:07
Descomprimir multiples autoextraibles con contraseña (ej: tuanimeligero)
@echo off
set pwshcmd=powershell -noprofile -command "&{[System.Reflection.Assembly]::LoadWithPartialName('System.windows.forms') | Out-Null;$FolderDialog = New-Object System.Windows.Forms.FolderBrowserDialog;$FolderDialog.Description = \"Elige la carpeta donde se encuentran los autoextraibles\";$FolderDialog.rootfolder = \"MyComputer\";$FolderDialog.SelectedPath = (Get-Item -Path '.').FullName; $FolderDialog.ShowDialog()|out-null; $FolderDialog.SelectedPath}"
for /f "delims=" %%s in ('%pwshcmd%') do (
set selected=%%s
)
set pwshcmd=powershell -noprofile -command "&{[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null;[Microsoft.VisualBasic.Interaction]::InputBox('Confirma o escribe la clave para extraer los archivos', 'Clave', 'tuanimeligero')|Out-String}"

Description

Documentation about the workflow with git for collaboration.

Steps

All steps below must have semantic and understandable names and/or descriptions

Feature or change
  1. Move to master: git checkout master
  2. Update working directory: git pull
  3. Create a branch: git checkout -b my-feature (if exist just move to it git checkout my-feature)
  4. Start coding
@samuelluis
samuelluis / digitalocean.md
Last active June 6, 2017 20:08
Configuracion de servidor en DigitalOcean en esencia para un app MeteorJS.

Como configurar una instancia de Digital Ocean para Bontix Displays

  1. Creamos un droplet en Digital Ocean usando Ubuntu (la version recomendada por defecto), de 1GB de RAM en adelante.
  2. Iniciamos session ssh root@<ip-de-nuestro-droplet> usando la password que nos envian al email de nuestra cuenta de Digital Ocean.
  3. Nos pedira cambiar la clave, para lo cual digitamos la misma que usamos en el login y luego ponemos la nueva 2 veces.
  4. Una vez dentro realizaremos la siguiente rutina de comandos:
    • Configuraciones del servidor
      • sudo apt-get update
      • sudo apt-get install vim git ssh wget htop curl expect
  • git clone https://gist.github.com/df5516dc160b303329ea596d8c0b8cfb.git
var Wrapper = function(obj){
if(obj == null) obj = {};
Object.defineProperty(this, "__value__", {
enumerable: false,
configurable: true,
writable: false,
value: obj
});
@samuelluis
samuelluis / object-watch.js
Last active August 26, 2016 23:45 — forked from eligrey/object-watch.js
object.watch polyfill in ES5
if (!Object.prototype.typeof) {
Object.defineProperty(Object.prototype, "typeof", {
enumerable: false
, configurable: true
, writable: false
, value: function (Type) {
toString = Object.prototype.toString;
return toString.call(this) == toString.call(new Type());
}
});
#!/bin/bash -xe
# You need to run this file just once
# It makes changes to the .gitconfig file in the home directory
# Configuring git to show colors in console
git config --global color.ui true
# Add aliases for basic git commands
git config --global alias.ac '!git add -A && git commit -m'
#!/bin/bash -e
help="Usage:\n\$0 '<git user.name>' <git user.email>"
if [ -n "$1" ]
then
echo "git user.name: $1"
GIT_USER_NAME=$1
else
echo -e $help
<!-- update_city_menu.html.erb -->
<% if @state.cities.present? %>
<select id="neighborhood_field" name="search[city_field]">
<%= options_from_collection_for_select(@state.cities, :id, :name) %>
</select>
<% end %>