Skip to content

Instantly share code, notes, and snippets.

Avatar

Sebastian Gamboa sagmor

View GitHub Profile
@sagmor
sagmor / Day 2.js
Last active Sep 19, 2019
Algorithms For Carito
View Day 2.js
// x = [1,5,7,4]
// return [5,6,4]
function pop(x) {
var n = [];
for (var i = 0; i < x.length -1; i++) {
n[i] = x[i+1];
}
return n
}
View Eating.md

Foods:

  • Sandwiches: In chile we are really into sandwiches, with a huge variety of them to try, in a way, they are to Chile what Tacos are to Mexico
  • Empanadas: Pocket's of dough filled with food, the most traditionals are:
    • Pino: Meet and onion mixture (with a little bit of egg, 1 olive and 1-2 raisins)
    • Mariscos ❤️: (Seafood) one of my favorites made with an arbitrary mix of
    • Queso: (Cheese) traditionally it's just cheese, but can be mixed with other ingreedients (like chicken, mushrooms, shellfish or shrimps)
  • Humita: It's a corn dough steamed on it's own leafs (similar to the mexican tamale)
  • Pastel de choclo: The same filling of the empanada is covered with the same dough from the Humita
  • Traditional Preparations: These are common preparations that are reused with different ingredients to make a huge arrange of options
@sagmor
sagmor / Boxstarter.ps1
Last active Jul 7, 2018
Boxstarter Config
View Boxstarter.ps1
# https://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/sagmor/630a26cdd3119fa797ce9ee7ec0ba800/raw/ba208328590139805af38a3b2962acc32758d2b8/Boxstarter.ps1
### windows configs ###
Set-ExplorerOptions -showFileExtensions -EnableShowFullPathInTitleBar
### basic stuff ###
cinst 7zip
cinst 1password
# cinst steam
View Rinkeby wallet
0xA74F25E13F984799B1b7cbd2157CC261e6f3d68c
@sagmor
sagmor / 1-freeswitch.sh
Created Sep 6, 2013
WIP: Freeswitch and Adhearsion Debian/Ubuntu Setup
View 1-freeswitch.sh
###
# Install Freeswitch on Debian/Ubuntu
# Mostly taken from http://robbietilton.com/blog/?p=1057
apt-get install git-core build-essential autoconf automake libtool libncurses5 libncurses5-dev gawk libjpeg-dev libz-dev pkg-config<
cd /usr/local/src
git clone git://git.freeswitch.org/freeswitch.git
cd freeswitch
@sagmor
sagmor / download-and-install.sh
Last active Sep 12, 2020 — forked from andrius/download-and-install.sh
Script to install Asterisk with Fax support and Adhearsion on Debian/Ubuntu
View download-and-install.sh
#!/bin/bash
# function to generate random password, on input requires an argument - lenght of password
genpasswd() {
local l=$1
[ "$l" == "" ] && l=20
tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${l} | xargs
}
# MySQL default root password
@sagmor
sagmor / 0-README.md
Last active Oct 7, 2015
Machine Bootstrap
View 0-README.md

Machine Bootstrap

The idea of this gist is to document all the needed steps to setup a working machine with all the stuff that I need during development.

Requirements

Command Line Tools for Xcode: Download them from XCode or directly from https://developer.apple.com/downloads

@sagmor
sagmor / working.m
Created Apr 12, 2012
Zebra Print Test
View working.m
// This one gets locked
+ (void)print1WithAddress:(NSString *)printerAddress andPort:(NSInteger)printerPort
{
NSError *error = nil;
TcpPrinterConnection *connection = [[TcpPrinterConnection alloc] initWithAddress:printerAddress andWithPort:printerPort];
[connection open];
NSString *file =
@sagmor
sagmor / gist:1174827
Created Aug 27, 2011
Some minor hacks for console.fm on fluid
View gist:1174827
// ==UserScript==
// @name Console Hacks
// @description Some minor hacks for console.fm
// @include http://*console.fm/*
var lastFm = {
enabled: false,
key: "APIKEY",
secret: "SECRETKEY",
session: "SESSIONKEY"
@sagmor
sagmor / app_config.rb
Created Jul 21, 2011
Get an AppConfig file in your app
View app_config.rb
# This goes to Rails.root/lib
# Requires the hashie gem
::AppConfig = begin
config_file = File.expand_path('../../config/config.yml', __FILE__)
config = Hashie::Mash.new YAML.load_file( config_file )[ Rails.env ]
local_config_file = File.expand_path('../../config/config.local.yml', __FILE__)
if File.exists? local_config_file
config.merge! YAML.load_file( local_config_file )[ Rails.env ] || {}