Skip to content

Instantly share code, notes, and snippets.

Avatar

Ricardo Rossi ricardo-rossi

View GitHub Profile
@ricardo-rossi
ricardo-rossi / StripeBilling.php
Created Sep 18, 2014
Laravel Adapter for Stripe Billing
View StripeBilling.php
<?php namespace Endata\Billing;
use Stripe;
use Stripe_Charge;
use Stripe_Customer;
use Stripe_InvalidRequestError;
use Stripe_CardError;
use Config;
use Exception;
View .vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=/etc/vim/bundle/vundle
call vundle#begin('/etc/vim/bundle') " Use a shared folder
set number
set mouse=a
set term=xterm-256color
View StackScript-LAMP
#!/bin/bash
# This block defines the variables the user of the script needs to input
# when deploying using this script.
#
# <UDF name="hostname" label="The hostname for the new Linode.">
# <UDF name="username" label="Add a user account to add to sudo">
# <UDF name="password" label="The sudo user's password">
# <UDF name="db_password" Label="MySQL root Password" />
# <UDF name="db_name" Label="Database Name" default="" example="Create this database" />
# <UDF name="db_name2" Label="Database 2 Name" default="" example="Create this database" />
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active Sep 9, 2019
Installing ElasticSearch on Ubuntu 14.04
View ElasticSearch.sh
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
View sformat.js
/*
sformat(str, arg1, arg2, etc..)
USAGE:
==============================================================
sformat("{0}", "test"); //returns test
sformat("{{0}}"); //returns {0}
sformat("{{{0}}}", "test"); //returns {test}
sformat("{0} {0}", "test"); //returns test test
sformat("{0} {1}", "first", "second"); //returns first second
You can’t perform that action at this time.