Skip to content

Instantly share code, notes, and snippets.

View jglozano's full-sized avatar

Javier Lozano jglozano

View GitHub Profile
@jglozano
jglozano / beyond-compare-setup.md
Last active February 9, 2018 16:01
Beyond Compare Git Diff/Merge Setup

Diff

git config --global diff.tool bc3 git config --global difftool.bc3.path "c:/Program Files/Beyond Compare 4/bcomp.exe"

3way Merge

git config --global merge.tool bc3 git config --global mergetool.bc3.path "c:/Program Files/Beyond Compare 4/bcomp.exe"

@jglozano
jglozano / .bash_profile
Last active January 27, 2021 17:48
bash profile that adds support for Git
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
fi

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jglozano
jglozano / Luke.txt
Created December 25, 2017 03:54
Luke 2:1-14
In those days a decree went out from Caesar Augustus that the whole world should be enrolled. This was the first enrollment, when Quirinius was governor of Syria. So all went to be enrolled, each to his own town. And Joseph too went up from Galilee from the town of Nazareth to Judea, to the city of David that is called Bethlehem, because he was of the house and family of David, to be enrolled with Mary, his betrothed, who was with child. While they were there, the time came for her to have her child, and she gave birth to her firstborn son. She wrapped him in swaddling clothes and laid him in a manger, because there was no room for them in the inn. Now there were shepherds in that region living in the fields and keeping the night watch over their flock. The angel of the Lord appeared to them and the glory of the Lord shone around them, and they were struck with great fear. The angel said to them, “Do not be afraid; for behold, I proclaim to you good news of great joy that will be for all the people. For today
@jglozano
jglozano / NorthwindDb.cs
Last active November 16, 2017 03:10
.NET Development YTT Demo - NorthwindDb upgrade with NQuery
public static class NorthwindDb
{
public static string GetData(string path)
{
var values = GetRetiredEmployees(path);
return string.Join(Environment.NewLine, values);
}
public static string[] GetRetiredEmployees(string path)
{
@jglozano
jglozano / PersonServicesCode.cs
Last active November 16, 2017 03:09
.NET Development YTT Demo - code for interface, service, and viewmodel
// Interface
public interface IPersonService
{
PersonViewModel[] GetRetiredPeople(string dataPath);
}
// Implementation
public class PersonService : IPersonService
{
@jglozano
jglozano / HomeController.cs
Last active November 16, 2017 03:11
.NET Development YTT Demo - HomeController code
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Hosting;
using System.IO;
using Northwind.Data;
namespace Northwind.Web.Controllers
{
public class HomeController : Controller
{
@jglozano
jglozano / Northwind.xml
Created October 4, 2017 17:11
Northwind DB as XML File
This file has been truncated, but you can view the full file.
<?xml version="1.0" standalone="yes"?>
<Northwind>
<xs:schema id="Northwind" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="Northwind" msdata:IsDataSet="true" msdata:Locale="de-DE">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="Categories">
<xs:complexType>
<xs:sequence>
<xs:element name="CategoryID" type="xs:int" minOccurs="0" />
@jglozano
jglozano / nuget.config
Last active October 4, 2017 16:55
.NET Demo nuget.config -- add at same level as .sln
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<solution>
<add key="disableSourceControlIntegration" value="true" />
</solution>
<packageRestore>
<!--Allow NuGet to download missing packages -->
<add key="enabled" value="True" />
<!-- Automatically check for missing packages during build in Visual Studio -->
<add key="automatic" value="True" />
@jglozano
jglozano / DefaultInstall.sql
Last active February 5, 2018 15:06
IAppBuidler Extensions for Configuring Hangfire
-- This file is part of Hangfire.
-- Copyright © 2013-2014 Sergey Odinokov.
--
-- Hangfire is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as
-- published by the Free Software Foundation, either version 3
-- of the License, or any later version.
--
-- Hangfire is distributed in the hope that it will be useful,