Skip to content

Instantly share code, notes, and snippets.

Avatar

Luiz Gustavo M. Sampaio luizs81

View GitHub Profile
@luizs81
luizs81 / signalr-client.js
Last active Dec 4, 2017
SignalR Client - JavaScript Implementation
View signalr-client.js
$('#bid-area').hide();
loadJavascript('scripts/jquery.signalR-2.2.2.min.js', () => {
loadJavascript('signalr/hubs', () => {
fetchProduct();
getActivePoints();
getNumberOfBids();
getBidRanking();
});
});
View mapping.yml
-
github: luizs81
slack: luiz
@luizs81
luizs81 / Vagrantfile
Last active Jul 29, 2016
Bootstrap a Vagrant box with Ubuntu Trusty64 for Python development
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
@luizs81
luizs81 / increase_swap.sh
Last active Jul 5, 2016 — forked from shovon/increase_swap.sh
How to create/increase swap file in Ubuntu
View increase_swap.sh
#!/bin/sh
# size of swapfile in megabytes
swapsize=8000
# does the swap file already exist?
grep -q "swapfile" /etc/fstab
# if not then create it
if [ $? -ne 0 ]; then
@luizs81
luizs81 / MergeCSV.bas
Last active Sep 7, 2015
Import all CSV files from a folder into one Excel file, but separated sheets
View MergeCSV.bas
Sub MergeCSV()
'Author: Jerry Beaucaire
'Date: 8/16/2010
'Summary: Import all CSV files from a folder into separate sheets
' named for the CSV filenames
'Update: 2/8/2013 Macro replaces existing sheets if they already exist in master workbook
Dim fpath As String
Dim fCSV As String
Dim wbCSV As Workbook
Dim wbMST As Workbook
@luizs81
luizs81 / currency_helper.php
Last active Dec 30, 2015
CodeIgniter helper to format numbers to Japanese currency, using the kanjis for thousand and ten thousand.
View currency_helper.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('format_yen'))
{
/**
* Returns a number in Japanese currency format
* @param float $value The number to be formated
* @param string $symbol_position Define if should use the pre or post aligned kanji
* @param string $decimal Define what to do with decimal part of number
* @return boolean|string Returns the formated number or FALSE in case of error.
You can’t perform that action at this time.