Skip to content

Instantly share code, notes, and snippets.

View marciotoshio's full-sized avatar

Marcio Toshio Ide marciotoshio

View GitHub Profile
@marciotoshio
marciotoshio / rails-vagrant-provision.sh
Last active June 4, 2016 02:05 — forked from johanneswuerbach/rails-vagrant-provision.sh
Provision a vagrant box with ruby stable (using rvm), postgres, redis and node (using nvm)
#!/usr/bin/env bash
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8
sudo apt-get update
sudo apt-get install -y build-essential git curl libxslt1-dev libxml2-dev libssl-dev
# postgres
@marciotoshio
marciotoshio / provision.sh
Last active April 13, 2016 11:37
vagrant provision with postgres and ruby on centos
#!/bin/bash
# based on http://monksealsoftware.com/dead-simple-provisioning-for-ruby-on-rails-postgres-with-vagrant-and-centos-6-6/
echo "Installing package dependencies"
sudo yum update
sudo yum install -y apr-devel apr-util-devel autoconf automake curl-devel \
g++ gcc gcc-c++ git glibc-headers httpd-devel libxml2 \
libxml2-devl libxslt libxslt-devel libyaml-devel make \
openssl-devel patch readline \
@marciotoshio
marciotoshio / show_all_git_status.ps1
Created November 17, 2015 14:25
PowerShell script to show all statuses from all your git repos, needs Posh-Git module
$directories = Get-ChildItem | ?{ $_.PSIsContainer } | Select-Object -Expand FullName
foreach ($dir in $directories)
{
if(Test-Path($dir + '/.git'))
{
Write-Host($dir)
cd $dir
Write-GitStatus(Get-GitStatus)
cd ..
@marciotoshio
marciotoshio / gist:a5b7c8cd92fe0d25f687
Created August 13, 2015 15:07
EF manual migration
migrate.exe [file_with_migrations.dll] /StartUpDirectory=.\MyProject\bin\Release /connectionString="data source=my_server;Initial Catalog=my_db;Trusted_Connection=True;MultipleActiveResultSets=True" /connectionProviderName="System.Data.SqlClient" /verbose
@marciotoshio
marciotoshio / generate_release.ps1
Last active December 1, 2015 11:29
Script to generate tag and push to release branch
param([string]$v = "", [string]$m = "")
$ciHost="http://my.jenkins"
$projFolder="MyProj"
$devJob="JenkinsJobDev"
$homJob="JenkinsJobHom"
$devToken="JenkinTokenDev"
$homToken="JenkinTokenHom"
function CreateVersionFile($tag) {
@marciotoshio
marciotoshio / keybase.md
Created September 22, 2014 14:54
keybase.md

Keybase proof

I hereby claim:

  • I am marciotoshio on github.
  • I am toshio (https://keybase.io/toshio) on keybase.
  • I have a public key whose fingerprint is EA55 1A1F 657A 4458 9B0E CA1B C274 7FEE F368 28DA

To claim this, I am signing this object:

@marciotoshio
marciotoshio / ValidadorDeCpf.cs
Created April 25, 2011 23:11
Classe para validar CPF
using System.Collections.Generic;
using System.Linq;
public class ValidadorDeCpf
{
public static bool Validar(string cpf)
{
cpf = LimparCpf(cpf);
@marciotoshio
marciotoshio / .hgignore for Umbraco & Visual Studio
Created April 5, 2011 21:21
.hgignore for Umbraco and Visual Studio
# use glob syntax
syntax: glob
# Umbraco
Cms/App_Browsers/
Cms/App_Code/
Cms/App_Data/ClientDependency/
Cms/App_Data/ExamineIndexes/
Cms/App_Data/umbraco.config
Cms/App_Data/preview/
@marciotoshio
marciotoshio / umbracoSettings.config
Created October 30, 2010 16:23
UrlReplacing node with extras characters
<urlReplacing>
<char org=" ">-</char>
<char org="&quot;"></char>
<char org="."></char>
<char org=";"></char>
<char org="/"></char>
<char org=":"></char>
<char org="+">plus</char>
<char org="*">star</char>
<char org="&amp;"></char>