Skip to content

Instantly share code, notes, and snippets.

View danieldiazastudillo's full-sized avatar
🎯
Focusing

Daniel Díaz danieldiazastudillo

🎯
Focusing
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2022-12-22 12:34:38" build="220807">
<value name="Language" type="string" data="en"/>
<value name="StartType" type="hex" data="02"/>
<value name="CmdLine" type="string" data=""/>
<value name="StartTasksFile" type="string" data=""/>
<value name="StartTasksName" type="string" data="{Shells::PowerShell Core}"/>
<value name="StartFarFolders" type="hex" data="00"/>
@danieldiazastudillo
danieldiazastudillo / oh-my-posh-config.json
Last active December 30, 2022 19:26
Oh-My-Posh Config
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"type": "os",
"style": "diamond",
@danieldiazastudillo
danieldiazastudillo / Microsoft.PowerShell_profile.ps1
Created December 22, 2022 11:46
PowerShell OhMyPosh configuration
Import-Module posh-git
Import-Module -Name Terminal-Icons
oh-my-posh --init --shell pwsh --config ~/scoop/apps/oh-my-posh/current/themes/gmay.omp.json | Invoke-Expression
SmtpClient client = new SmtpClient("mysmtpserver");
client.UseDefaultCredentials = false;
client.Credentials = new NetworkCredential("username", "password");
MailMessage mailMessage = new MailMessage();
mailMessage.From = new MailAddress("whoever@me.com");
mailMessage.To.Add("receiver@me.com");
mailMessage.Body = "body";
mailMessage.Subject = "subject";
client.Send(mailMessage);
@danieldiazastudillo
danieldiazastudillo / AccessWithDapper.cs
Created March 26, 2019 20:31
Read via ODBC Access Database
/* VIA CHOCO INSTALL:
* choco install msaccess2010-redist-x64
* VIA NUGET INSTALL:
* dotnet add package System.Data.Odbc
* dotnet add package Dapper
* */
using Dapper;
using System;
using System.Data.Odbc;
@danieldiazastudillo
danieldiazastudillo / Dockerfile
Created August 7, 2018 17:01
Dockerfile - Laravel - Development
# Base image
FROM php:7
# Install dependencies
RUN apt-get update -y && apt-get install -y openssl zip unzip git
# Get & Install Composer in path
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN docker-php-ext-install pdo mbstring
@danieldiazastudillo
danieldiazastudillo / Dockerfile
Created August 7, 2018 14:14
Dockerfile for Angular 6 apps (no-auto-build)
## Base image
FROM nginx:1.13.3-alpine
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
## overrides nginx defaults
COPY ./nginx-custom.conf /etc/nginx/conf.d/default.conf
## From 'builder' stage copy over the artifacts in dist folder to default nginx public folder
COPY /dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]
using Microsoft.Owin;
using Microsoft.Owin.Security.OAuth;
using Owin;
using System;
[assembly: OwinStartupAttribute(typeof(PortalProveedores.API.Startup))]
namespace PortalProveedores.API
{
public partial class Startup
{
@danieldiazastudillo
danieldiazastudillo / WebApiConfig.cs
Last active July 5, 2017 22:46
Configuración base para WebAPI2 con CORS y CamelCase por defecto
using System.Web.Http;
using Newtonsoft.Json.Serialization;
namespace PROYECTO.API
{
public static class WebApiConfig
{
public static void Register(HttpConfiguration config)
{
//HABILITA CORS PARA TODA LA WEBAPI