Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am vcavalcante on github.
  • I am vcavalcante (https://keybase.io/vcavalcante) on keybase.
  • I have a public key ASCQDumgkhe018LU0T95HsmCimVifvAiWm2drMYrHkNBBQo

To claim this, I am signing this object:

class Program
{
static void Main(string[] args)
{
var configuration = new Configuration();
configuration.Configure();
var SessionFactory = configuration.BuildSessionFactory();
var session = SessionFactory.OpenSession();
<?xml version=”1.0" encoding=”utf-8" ?>
<hibernate-mapping xmlns=”urn:nhibernate-mapping-2.2" assembly=”ConsoleApp1" namespace=”ConsoleApp1" auto-import=”true”>
<class name=”City”>
<id name=”Id” type=”int” generator=”identity”/>
<property name=”Name” />
<property name=”Population” />
</class>
</hibernate-mapping>
CREATE TABLE dbo.City (
Id INT IDENTITY (1, 1) NOT NULL,
Name VARCHAR (255) NULL,
Population BIGINT NULL,
PRIMARY KEY CLUSTERED (Id ASC)
);
public class City
public virtual int Id get; set;
public virtual long Population get; set;
public virtual string Name get; set;
}
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=NHTeste;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False</property>
<property name="dialect">NHibernate.Dialect.MsSql2012Dialect</property>
@vcavalcante
vcavalcante / osx-setup.md
Created November 5, 2015 20:02 — forked from zenorocha/.hyper.js
Setup Mac OS X Mavericks (10.9)

Setup Mac OS X

I'm in a hospital in Spain and my MacBook was stolen.

Hospital Commit

Now I bought a new one and need to configure it. I have an external hard drive that backup everything using Time Machine, but I don't want all the crap I had in the old one.

1. Run Software Update

@vcavalcante
vcavalcante / index.html
Created October 23, 2014 02:26
Usando querySelectorAll no lugar do jQuery retornando array de itens // source http://jsbin.com/nivafaciqu
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Usando querySelectorAll no lugar do jQuery retornando array de itens" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
span{
display:block
@vcavalcante
vcavalcante / index.html
Created October 23, 2014 02:21
Usando querySelectorAll no lugar do jQuery retornando array de itens // source http://jsbin.com/nivafaciqu
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Usando querySelectorAll no lugar do jQuery retornando array de itens" />
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
span{
display:block
Onde tudo começou: http://alistapart.com/article/responsive-web-design
http://alistapart.com/d/responsive-web-design/ex/ex-site-flexible.html
Comparativo
https://docs.google.com/a/cavalcante.net/spreadsheet/ccc?key=0Al0lI17fOl9DdDgxTFVoRzFpV3VCdHk2NTBmdVI2OXc#gid=0
Responsive calculator
http://rwdcalc.com/
Pixel to EM