Skip to content

Instantly share code, notes, and snippets.

@OsvaldoJ
OsvaldoJ / DgmlController.cs
Created March 11, 2022 15:25 — forked from redwards510/DgmlController.cs
Uses EF Core Power Tools by ErikEJ (see link in code) to creates a .DGML class diagram (and serves it up for saving) of most of the EntityFrameworkCore (EF Core 2) entities in the ASP.Net MVC project when you go to yourwebsite/dgml. This is useful because there is no Class Diagram support in .Net Core 2 yet and it is difficult to find any kind o…
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace CHANGEME.Api.Controllers
@OsvaldoJ
OsvaldoJ / google-chrome-lxc.sh
Created November 11, 2021 13:20 — forked from Roadmaster/google-chrome-lxc.sh
Set up an lxc container with google chrome so it runs confined but displays on localhost.
#!/bin/bash
# Set up an lxc container with google chrome so it runs confined but displayed on the
# localhost.
# Adapted from https://blog.simos.info/how-to-run-graphics-accelerated-gui-apps-in-lxd-containers-on-your-ubuntu-desktop/
# Assume setguid/setid for root is properly setup
# root:1000:1
# Assume aptcache profile exists, see https://gist.github.com/Roadmaster/754110f3f49fef19ec89ae29f29edd11
LXC_NAME=chrome-container
@OsvaldoJ
OsvaldoJ / helpful-docker-commands.sh
Created March 9, 2019 15:41 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@OsvaldoJ
OsvaldoJ / frontendDevlopmentBookmarks.md
Created June 6, 2017 19:49 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.
@OsvaldoJ
OsvaldoJ / README.md
Created April 24, 2017 18:12 — forked from pablobm/README.md
A clear convention for a CRUD with standard Ember + Ember Data

CRUD with Ember (+ Data)

Compatible with Ember 1.13.0+ Compatible with Ember Data 1.13.0+

Ember's official documentation describes a number of low-level APIs, but doesn't talk much about how to put them together. As a result, a simple task such as creating a simple CRUD application is not obvious to a newcomer.

###Home Screen

  • Cambiar la imagen (logo.png) que esta en el Splash por otra.
  • Cambiar el texto/color/tamaño/tipo de letra de "Connect To General"
  • Agregar una imagen en la parte inferior relativo a Xamarin Dev Days

###Chat Screen

  • Cambiar la imagen de fondo de la pantalla
  • La imagen de los mensajes que usted envía en Android debe ser el Robot de Android y en iOS una manzana
  • La imagen de los mensajes que usted recibe debe ser de un minion
  • La imagen de los mensajes que usted recibe no debe ser encerrada en un circulo, debe ser un cuadrado.
@OsvaldoJ
OsvaldoJ / IQueryableExtensions
Created November 10, 2016 12:32 — forked from rionmonster/IQueryableExtensions
Resolve the SQL being executed behind the scenes in Entity Framework Core
public class IQueryableExtensions
{
private static readonly FieldInfo QueryCompilerField = typeof(EntityQueryProvider).GetTypeInfo().DeclaredFields.First(x => x.Name == "_queryCompiler");
private static readonly PropertyInfo NodeTypeProviderField = QueryCompilerTypeInfo.DeclaredProperties.Single(x => x.Name == "NodeTypeProvider");
private static readonly MethodInfo CreateQueryParserMethod = QueryCompilerTypeInfo.DeclaredMethods.First(x => x.Name == "CreateQueryParser");
private static readonly FieldInfo DataBaseField = QueryCompilerTypeInfo.DeclaredFields.Single(x => x.Name == "_database");
@OsvaldoJ
OsvaldoJ / Deploy-SSRSProject.ps1
Created May 12, 2016 18:40 — forked from jstangroome/Deploy-SSRSProject.ps1
PowerShell scripts to deploy a SQL Server Reporting Services project (*.rptproj) to a Reporting Server
#requires -version 2.0
[CmdletBinding()]
param (
[parameter(Mandatory=$true)]
[ValidatePattern('\.rptproj$')]
[ValidateScript({ Test-Path -PathType Leaf -Path $_ })]
[string]
$Path,
[parameter(
@OsvaldoJ
OsvaldoJ / T4TS.tt
Created April 27, 2016 20:25 — forked from alexdresko/T4TS.tt
T4 template to generate TypeScript interface definitions with BreezeJS support.
<#@ template language="C#" debug="true" hostspecific="true" #>
<#@ output extension=".d.ts" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="Microsoft.VisualStudio.Shell.Interop.8.0" #>
<#@ assembly name="EnvDTE" #>
<#@ assembly name="EnvDTE80" #>
<#@ import namespace="System.Collections.Generic" #>
<#@ import namespace="System.Linq" #>
<#@ import namespace="System.Text" #>
<#@ import namespace="EnvDTE" #>
@OsvaldoJ
OsvaldoJ / Hubs.tt
Last active August 29, 2015 14:19 — forked from robfe/Hubs.tt
<#@ template debug="true" hostspecific="true" language="C#" #>
<#@ output extension=".d.ts" #>
<# /* Update this line to match your version of SignalR */ #>
<#@ assembly name="$(SolutionDir)\packages\Microsoft.AspNet.SignalR.Core.2.2.0\lib\net45\Microsoft.AspNet.SignalR.Core.dll" #>
<# /* Load the current project's DLL to make sure the DefaultHubManager can find things */ #>
<#@ assembly name="$(TargetPath)" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Web" #>
<#@ assembly name="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #>
<#@ assembly name="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" #>