Skip to content

Instantly share code, notes, and snippets.

View acamino's full-sized avatar
💭
千本桜景厳

Agustin Camino acamino

💭
千本桜景厳
  • MCF Consulting, LLC
  • Quito, Ecuador
View GitHub Profile
@acamino
acamino / authoring_with_viewsaurus.md
Last active November 8, 2016 19:33
Authoring with viewsaurus

Authoring Tutorials with Viewsaurus

Recently I've been writing a few tutorials for Twilio, so far it was a pleasant experience. It's always fun to play with a nice API in the languages you like, right?

The tool we're using to write these tutorials made our work easy. I enjoyed working with viewsaurus.

If you have to use this viewsaurus,

@acamino
acamino / working-with-forks.md
Last active February 29, 2016 21:59
Working with forks

Working with Forks

List remotes repositories.

git remote -v

Add a new remote upstream repository that will be synced with the fork.

@acamino
acamino / OneTouchClient.cs
Created November 5, 2015 01:49
OneTouch Support
using System;
using System.Collections.Specialized;
using System.IO;
using System.Net;
using System.Text;
using Authy.Net;
using Newtonsoft.Json;
namespace Authy.Net
{
@acamino
acamino / Prelude.hs
Last active December 29, 2015 11:14
CIS 194 Week 4
-- Prelude functions which are defined in terms of foldr
-- http://www.cis.upenn.edu/~cis194/spring13/lectures/04-higher-order.html
length' :: [a] -> Int
length' = foldr (\_ acc -> 1 + acc) 0
sum' :: Num a => [a] -> a
sum' = foldr (*) 1
product' :: Num a => [a] -> a
@acamino
acamino / release_them.rb
Created February 3, 2016 01:40
Releasing Twilio Numbers
# The numbers will be pulled in groups of 50, so if you
# have more than 50 numbers then you'll have to run this
# script more than once.
require 'twilio-ruby'
# Get your Account Sid and Auth Token from twilio.com/user/account
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
client = Twilio::REST::Client.new(account_sid, auth_token)
@acamino
acamino / CallController.Create.cs
Created August 25, 2016 17:13
Blog: Build a Simple Phone Verification System with Twilio Voice, C#, SQL Server, and jQuery
// POST: Call/Create
[HttpPost]
public async Task<JsonResult> Create(string phoneNumber)
{
// Delete a phone number.
await _service.DeleteByPhoneNumberAsync(phoneNumber);
// Create a phone number.
var verificationCode = GenerateVerificationCode();
await _service.CreateAsync(
@acamino
acamino / HttpClientApproach.cs
Last active August 16, 2024 12:50
4 Ways to Parse a JSON API with C#
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Headers;
namespace HttpClientApproach
{
internal class Contributor
{
public string Login { get; set; }
@acamino
acamino / README.md
Last active November 21, 2024 10:20
Shortcuts to Improve Your Bash & Zsh Productivity

Shortcut — Action

  • CTRL + A — Move to the beginning of the line
  • CTRL + E — Move to the end of the line
  • CTRL + [left arrow] — Move one word backward (on some systems this is ALT + B)
  • CTRL + [right arrow] — Move one word forward (on some systems this is ALT + F)
  • CTRL + U — (bash) Clear the characters on the line before the current cursor position
  • CTRL + U —(zsh) If you're using the zsh, this will clear the entire line
  • CTRL + K — Clear the characters on the line after the current cursor position
  • ESC + [backspace] — Delete the word in front of the cursor
@acamino
acamino / colors.sh
Created October 20, 2016 11:18
Bash Colors
#!/bin/bash
echo -e "\033[0mCOLOR_NC (NO COLOR)"
echo -e "\033[1;37mCOLOR_WHITE\t\033[0;30mCOLOR_BLACK"
echo -e "\033[0;34mCOLOR_BLUE\t\033[1;34mCOLOR_LIGHT_BLUE"
echo -e "\033[0;32mCOLOR_GREEN\t\033[1;32mCOLOR_LIGHT_GREEN"
echo -e "\033[0;36mCOLOR_CYAN\t\033[1;36mCOLOR_LIGHT_CYAN"
echo -e "\033[0;31mCOLOR_RED\t\033[1;31mCOLOR_LIGHT_RED"
echo -e "\033[0;35mCOLOR_PURPLE\t\033[1;35mCOLOR_LIGHT_PURPLE"
echo -e "\033[0;33mCOLOR_YELLOW\t\033[1;33mCOLOR_LIGHT_YELLOW"