Skip to content

Instantly share code, notes, and snippets.

View kelvinrfr's full-sized avatar

Kelvin Ferreira kelvinrfr

View GitHub Profile
@kelvinrfr
kelvinrfr / obs_twitch_chat.css
Last active September 2, 2022 01:04 — forked from Bluscream/obs_twitch_chat.css
Twitch chat transparent popout for OBS
/*
Twitch chat browsersource CSS for OBS
Just set the URL as https://www.twitch.tv/%%TWITCHCHANNEL%%/chat?popout=true
And paste this entire file into the CSS box
Original by twitch.tv/starvingpoet modified by github.com/Bluscream
General Settings
*/
body {
color: #FFFFFF!important;
@kelvinrfr
kelvinrfr / EntityFramework_UnitTesting_Challenges.cs
Last active August 19, 2022 21:48
Entity Framework unity testing challenges - mocking DbSet / EntityState
// class `Service`
public void Add()
{
// this is the code I want to test
var entry = await _dbContext.MyDbSetObject.AddAsync(data, cancellationToken);
if (entry.State != EntityState.Added)
{
// log error & return
}
@kelvinrfr
kelvinrfr / CoreTest.ps1
Created June 16, 2020 19:29 — forked from krishnaanaril/CoreTest.ps1
Powershell script for running dotnet-core unit tests and generate report.
param(
[Parameter(Mandatory=$true)]
[string]$testProjectPath,
[Parameter(Mandatory=$true)]
[string]$testSettingsPath,
[Parameter(Mandatory=$true)]
[string]$testResultsFolder
)
<#
@kelvinrfr
kelvinrfr / arrow-function-method.cs
Last active March 15, 2019 20:34
um simples exemplo de uma arrow function para criar um método.
public class X {
public string y() => "oi";
}
@kelvinrfr
kelvinrfr / persistence.xml
Created October 1, 2017 19:47 — forked from mortezaadi/persistence.xml
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
@kelvinrfr
kelvinrfr / cisc_02.js
Last active August 29, 2015 14:27
clientImageSelectCropper.basic.pt-BR
defaults = {
textCropButton: "Cortar", // texto do botão de cortar
textCleanButton: "Limpar", // texto do boão de limpar
cropBackGroundColor: "#747474", // cor do background da área não selecionada
cropOpacity: .4, // opacidade do background da área não selecionada
cropBoxWidth: 500, // largura máximo da imagem cortada
cropBoxHeight: 300, // altura máxima da imagem cortada
previewPanel: undefined, // Div que será mostrado a imagem prévia do corte. Se não informada não será gerado um preview
@kelvinrfr
kelvinrfr / cisc_01.html
Last active August 29, 2015 14:27
clientImageSelectCropper.basic.pt-BR
<h2>01 - Um simples seletor de imagem com opção de cortar</h2>
<div style="display:block">
<label style="display:block">Resultado:</label>
<img class="imgTargetArea" src="#" />
</div>
<script type="text/javascript">
$(".imgTargetArea").clientImageSelectCropper({
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace JsonTest
{