Skip to content

Instantly share code, notes, and snippets.

View ngdelcastillo's full-sized avatar

Noel del Castillo ngdelcastillo

View GitHub Profile
@ngdelcastillo
ngdelcastillo / ps1
Created January 10, 2016 13:42
Powershell Script
$env:path += ";" + (Get-Item "Env:ProgramFiles").Value + "\Git\bin"
(Get-Host).UI.RawUI.ForegroundColor = "gray"
function prompt
{
Write-host("[" + $(get-location) + "]") -foregroundcolor Green
return "$ "
}
function Get-Batchfile ($file) {
$cmd = "`"$file`" & set"
cmd /c $cmd | Foreach-Object {
@ngdelcastillo
ngdelcastillo / .bashrc
Created February 28, 2015 14:55
My Bash Setup
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# Update, upgrade and install development tools:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install build-essential git-core libssl-dev libsqlite3-dev curl nodejs nginx
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Add rbenv to the path:
echo 'export RBENV_ROOT=~/.rbenv' >> ~/.bash_profile
@ngdelcastillo
ngdelcastillo / ssh.log
Created August 30, 2014 05:33
Digital Ocean Report
➜ ~ ssh root@128.199.159.89
The authenticity of host '128.199.159.89 (128.199.159.89)' can't be established.
RSA key fingerprint is ef:0c:ac:ca:06:1f:79:81:f7:34:58:80:af:6a:78:fa.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '128.199.159.89' (RSA) to the list of known hosts.
root@128.199.159.89's password:
You are required to change your password immediately (root enforced)
Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-32-generic x86_64)
* Documentation: https://help.ubuntu.com/
@ngdelcastillo
ngdelcastillo / .vimrc
Last active August 29, 2015 14:04
Dev Setup
" Load Pathogen
execute pathogen#infect()
syntax on
filetype plugin indent on
" Noel - after pathogen are loaded
set nocompatible
let mapleader=" "
set smartindent
set tabstop=2
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev lib64readline-gplv2-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
cd ruby-2.0.0-p0/
./configure --prefix=/usr/local
make
make install
@ngdelcastillo
ngdelcastillo / amarreto.wsdl
Created July 19, 2012 05:39
Amarreto WSDL
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:ns="http://soap.amaretto.globe.com" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ax21="http://soap.amaretto.globe.com/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://soap.amaretto.globe.com">
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://soap.amaretto.globe.com/xsd">
<xs:complexType name="BalanceInquiryServiceResponse">
<xs:sequence>
<xs:element minOccurs="0" name="balance" type="xs:float"/>
<xs:element minOccurs="0" name="resultCode" type="xs:int"/>
<xs:e
@ngdelcastillo
ngdelcastillo / gist:2289180
Created April 3, 2012 03:57
Cucumber error
@login @registration
Feature: Login and registration
As a volunteer
I want to be able to sign in
So that I can volunteer for projects
Scenario: User creates an account # features/login_and_registration.feature:7
Given I am an unauthenticated user # features/step_definitions/login_and_registration_steps.rb:1
And an expertise exists with a name of "Education" # factory_girl-2.6.0/lib/factory_girl/step_definitions.rb:119
And I am on the new user registration page # features/step_definitions/web_steps.rb:44
require 'rubygems'
require 'net/sftp'
require 'faster_csv'
# Load our constants
host = "my.server.com"
user = "my_username"
password = "my_password"
port = 12345
dirs_to_create = "dirs_to_create.txt"