Skip to content

Instantly share code, notes, and snippets.

View franciscojunior's full-sized avatar

Francisco Figueiredo Jr. franciscojunior

View GitHub Profile
"\e[5~": history-search-backward
"\e[6~": history-search-forward
"\e[1~": beginning-of-line
"\e[4~": end-of-line
" Only do this part when compiled with support for autocommands.
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
<?xml version="1.0" encoding="utf-8"?>
<android.support.percent.PercentRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textViewTitle"
android:layout_width="match_parent"
@franciscojunior
franciscojunior / App.config
Last active August 29, 2015 13:56
EF sample for #160 - Returning DB generated values on insert for EF fixing #159
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<entityFramework>
@franciscojunior
franciscojunior / Program.cs
Last active December 19, 2015 08:59
Npgsql SSL Test program
using System;
using System.IO;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using Npgsql;
using Mono.Security.Protocol.Tls;
using Mono.Security.Authenticode;
namespace my
{
@franciscojunior
franciscojunior / NpgsqlConnectorPool.cs
Created March 14, 2013 16:30
This is a little hack to add more information about connection pool timeout problems. This change makes Npgsql logs the stacktrace of the allocation of all the connections which are present in the pool whenever there is a timeout when trying to get a connection from the pool. This helps to diagnose where the connection has been allocated.
// Copyright (C) 2002 The Npgsql Development Team
// npgsql-general@gborg.postgresql.org
// http://gborg.postgresql.org/project/npgsql/projdisplay.php
//
// Permission to use, copy, modify, and distribute this software and its
// documentation for any purpose, without fee, and without a written
// agreement is hereby granted, provided that the above copyright notice
// and this paragraph and the following two paragraphs appear in all copies.
//
// IN NO EVENT SHALL THE NPGSQL DEVELOPMENT TEAM BE LIABLE TO ANY PARTY
@franciscojunior
franciscojunior / NpgsqlTests.dll-results.log
Last active December 12, 2015 03:58
Nunit tests result
Tests run: 620, Failures: 44, Not run: 0, Time: 10.338 seconds
Failures:
1) NpgsqlTests.CommandTests.FunctionCallStringEscape :
expected: <0>
but was: <1>
at NpgsqlTests.CommandTests.FunctionCallStringEscape () [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
@franciscojunior
franciscojunior / TitleFlowIndicator.java
Created August 3, 2011 15:43
Sample of viewflow with fragments. Note that you have to use the custom file TitleFlowIndicator below because it contains the support for the FragmentPagerAdapter
/*
* Copyright (C) 2011 Patrik Åkerfeldt
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software