Skip to content

Instantly share code, notes, and snippets.

View johnnyasantoss's full-sized avatar

Johnny Santos johnnyasantoss

View GitHub Profile
johnnyasantoss / DbusNotification.cs
Last active September 15, 2023 18:11
C# Desktop Notifications on Linux
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Tmds.DBus;
[assembly: InternalsVisibleTo(Connection.DynamicAssemblyName)]
namespace dbus_test
/// <seealso></seealso>
johnnyasantoss / Exception.log
Created August 13, 2019 11:00
Reproduction of a bug when trying to write
Unhandled Exception: ImageMagick.MagickDrawErrorException: NonconformingDrawingPrimitiveDefinition `text' @ error/draw.c/RenderMVGContent/4398
at ImageMagick.MagickExceptionHelper.Check(IntPtr exception)
at ImageMagick.DrawingWand.NativeDrawingWand.Render()
at ImageMagick.MagickImage.Draw(IEnumerable`1 drawables)
at ImageMagick.Drawables.Draw(IMagickImage image)
at temp_test.Program.Main(String[] args) in /tmp/temp-test/Program.cs:line 29
johnnyasantoss /
Last active February 10, 2024 19:10
Adding .NET related mime types to Linux

Copy this xml to ...

sudo $EDITOR /usr/share/mime/packages/dotnet.xml


<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="">
  <mime-type type="application/x-dotnet-solution">
	  <comment>.NET Solution</comment>
	  <sub-class-of type="text/plain"/>
johnnyasantoss / my-awesome-gnome-extensions.txt
Last active March 11, 2020 12:58
A list of my awesome gnome extensions!! (separated with tabs for easy scripting)
Github Notifications
Sound Input & Output Device Chooser
Remove Dropdown Arrows
Status Area Horizontal Spacing
Extension Update Notifier
User Themes
Removable Drive Menu
Places Status Indicator
johnnyasantoss / .gitconfig
Last active May 13, 2024 16:58
JetBrains Rider as Default Merge and Diff tool
# Diff with JetBrains Rider
tool = rider
prompt = false
[difftool "rider"]
cmd = D:\\\\Program\\ Files\\\\Jetbrains\\\\apps\\\\Rider\\\\ch-0\\\\181.4379.788\\\\bin\\\\rider64.exe diff "$LOCAL" "$REMOTE"
# Merge with JetBrains Rider
johnnyasantoss /
Last active October 16, 2017 23:43
Installs mono ( on Fedora.
curl -OL$VERSION.tar.bz2
tar xvf mono-$VERSION.tar.bz2
cd mono-$VERSION
./configure --prefix=$PREFIX
johnnyasantoss / publish.cake
Created March 17, 2017 21:02
Deploy usando cake build
#addin "Cake.IIS"
#addin "Cake.Http"
#addin "Cake.Services"
using System;
string servidor = null;
var servidores = Argument<string>("AppServers", string.Empty).Split(',');
var appPoolOrService = Argument<string>("AppPoolOrService", string.Empty);
johnnyasantoss / TesteBoletoPV.php
Last active March 8, 2017 18:35
Um exemplo de como fazer uma chamada na API V4 de Boletos da PagueVeloz.
//dados necessários para fazer qualquer requisição
$email = '';
$token = '0000-1234-4321-5678-9876';
$dominio = '';
//cria o token de segurança para fazer a chamada na API
$authToken = base64_encode($email . ':' . $token);
johnnyasantoss / TesteBoletoPV.cs
Last active March 6, 2017 21:43
Um exemplo de uma chamada na API do PagueVeloz
using Newtonsoft.Json;
using System;
using System.Net.Http;
using System.Text;
namespace Teste.PV
public class Teste
public static void Main(string[] args)
johnnyasantoss / debug-ui-view.js
Created February 9, 2017 11:50
Use this script to debug ui-view (works with minified files too!) Just paste it on console and hit enter.
jQuery(function ($) {
var view = $("[ui-view]").first();
if (!view) return;
var $rootScope = angular.element(view).injector().get('$rootScope');
$rootScope.$on('$stateChangeStart', function (event, toState, toParams, fromState, fromParams) {
console.log('$stateChangeStart to ' + + '- fired when the transition begins. toState,toParams : \n', toState, toParams);