Skip to content

Instantly share code, notes, and snippets.

View giacomelli's full-sized avatar
🎮
gamedev

Diego Giacomelli giacomelli

🎮
gamedev
View GitHub Profile
using UnityEngine;
using System;
namespace Giacomelli.Framework
{
/// <summary>
/// TimeSpan Box Attribute - http://diegogiacomelli.com.br/unitytips-timespan-box-drawer
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public class TimeSpanBoxAttribute : PropertyAttribute
using GooglePlayGames;
using GooglePlayGames.BasicApi;
using UnityEngine;
public class AchievementsController : MonoBehaviour
{
void Start()
{
var config = new PlayGamesClientConfiguration.Builder().Build();
PlayGamesPlatform.InitializeInstance(config);
@giacomelli
giacomelli / resume.json
Last active April 22, 2024 13:41
resume.json
{
"meta": {
"theme": "flat"
},
"basics": {
"name": "Diego Giacomelli",
"label": "Senior .NET Developer",
"picture": "https://media.licdn.com/dms/image/D4D03AQERfJU87mCoWQ/profile-displayphoto-shrink_200_200/0/1665448935054?e=1700697600&v=beta&t=ATIC0tovs-MFn42z3tSrizgBERa9REq3baDROEfrUd8",
"email": "giacomelli@gmail.com",
"website": "http://diegogiacomelli.com.br",
@giacomelli
giacomelli / azure-pipelines.yml
Last active December 17, 2019 12:12
Azure Pipelines - Generating DB Script with SqlPackage.exe: http://diegogiacomelli.com.br/azure-pipelines-generating-db-script/
pool:
vmImage: 'vs2017-win2016'
variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
dbProject: 'Set with the name of your Sql Server Database Project'
targetDBConnectionString: 'Set with the connection string of the target database'
- task: VSBuild@1
using Dapper;
/// <summary>
/// Extension methods for Dapper arguments
/// </summary>
/// <remarks>
/// The methods below are used to indicate the argument data type to Dapper and avoid the NVARCHAR(4000) arguments on SQL.
/// http://diegogiacomelli.com.br/dapper-and-the-nvarchar-4000-arguments
/// </remarks>
public static class DapperArgumentExtensions
using Microsoft.ServiceBus.Messaging;
using Newtonsoft.Json;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Sample
{
public class AzureServiceBus<TMessage>
{
#tool nuget:?package=MSBuild.SonarQube.Runner.Tool&version=4.6.0
#addin nuget:?package=Cake.Sonar&version=1.1.22
#addin nuget:?package=Cake.Git&version=0.21.0
var target = Argument("target", "Default");
var solutionDir = "src";
var sonarLogin = "[SONARCLOUD-USER-TOKEN]";
var branch = GitBranchCurrent(".").FriendlyName;
Task("Build")
using UnityEngine;
using UnityEditor;
/// <summary>
/// Scene preview data.
/// http://diegogiacomelli.com.br/unitytips-scene-preview-window
/// </summary>
public class ScenePreviewData
{
Texture2D _texture;
using UnityEditor;
using UnityEngine;
/// <summary>
/// Hierarchy window game object icon.
/// http://diegogiacomelli.com.br/unitytips-hierarchy-window-gameobject-icon/
/// </summary>
[InitializeOnLoad]
public static class HierarchyWindowGameObjectIcon
{
@page "/tsp"
@inject IJSRuntime _js
<div class="container">
<div class="row">
<div>
Cities: <input type="text" @bind=@_numberOfCities onblur=@ResetGA disabled=@_tspGA.IsRunning />
</div>
<div>
<button onclick=@ResetGA disabled=@_tspGA.IsRunning >Reset</button>