Skip to content

Instantly share code, notes, and snippets.

View FusRoDah061's full-sized avatar

Allex Rodrigues FusRoDah061

  • Nelogica
  • Campinas - SP
View GitHub Profile
@FusRoDah061
FusRoDah061 / docker.sh
Created July 17, 2019 18:22
Docker snippets
#Remover imagens desnecessárias
docker rmi $(sudo docker images --filter "dangling=true" -q --no-trunc)
@FusRoDah061
FusRoDah061 / pom.xml
Created July 16, 2019 19:11
Adicionar JaCoCo em um projeto Maven
<project>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<goals>
@FusRoDah061
FusRoDah061 / igonore_deserialize
Created July 16, 2019 11:58
SpringBoot Jackson JSON ignore property on deserialization
// https://stackoverflow.com/questions/12505141/only-using-jsonignore-during-serialization-but-not-deserialization
// Use @JsonIgnore on class member and its getter. Use @JsonProperty on its setter.
class User{
// More fields here
@JsonIgnore
private String password;
@JsonIgnore
/**
* Source: https://github.com/PimpTrizkit/PJs/wiki/12.-Shade,-Blend-and-Convert-a-Web-Color-(pSBC.js)
Usage:
// Shade (Lighten or Darken)
pSBC ( 0.42, color1 ); // rgb(20,60,200) + [42% Lighter] => rgb(166,171,225)
pSBC ( -0.4, color5 ); // #F3A + [40% Darker] => #c62884
pSBC ( 0.42, color8 ); // rgba(200,60,20,0.98631) + [42% Lighter] => rgba(225,171,166,0.98631)
*/
static pSBC(p, c0, c1, l) {
let pSBCr = function (d) {
@FusRoDah061
FusRoDah061 / books-from-comunism.js
Created May 8, 2019 23:54
Download all books from https://books.goalkicker.com/. Paste the code on developers console at goalkick homepage
/*
Download all books from https://books.goalkicker.com/
*/
var a = document.getElementsByClassName('bookContainer');
a = Array.from(a);
var links = a.map((item) => item.children[0]);
@FusRoDah061
FusRoDah061 / ServiceInstaller.cs
Last active May 18, 2025 01:00
Class for installing windows service on C#
/*
using System;
using System.Runtime.InteropServices;
using System.Threading;
*/
/// <summary>
/// <para>
/// Sources:
/// <para>https://stackoverflow.com/questions/358700/how-to-install-a-windows-service-programmatically-in-c </para>
public class AsyncTask<T>
{
private BackgroundWorker _worker;
public bool Success { get; private set; }
public Exception Error { get; private set; }
public T Data { get; set; }
public bool WaitingCancelation { get
{
@FusRoDah061
FusRoDah061 / savevideo-me.js
Created March 9, 2019 22:18
Entre na página do vídeo (dailymotion apenas). Clique para redirecionar para o embed, clique denovo para baixar o vídeo.
javascript: (function () {
appPath = 'https://savevideo.me/pt/';
function redirect (){
var url = window.location.href;
if(url.indexOf("embed") == -1)
{
var position = url.indexOf(".com/") + 5;
url = [url.slice(0, position), "embed/", url.slice(position)].join('');
public class Crypt
{
public string SHA1(string input)
{
using (SHA1Managed sha1 = new SHA1Managed())
{
var hash = sha1.ComputeHash(Encoding.UTF8.GetBytes(input));
var sb = new StringBuilder(hash.Length * 2);
@FusRoDah061
FusRoDah061 / ConfigManager.cs
Created February 22, 2019 18:10
Gerenciador de configurações utilizando Sharp-Config 1.0.0
using SharpConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FolderScannerClassLibrary
{
public class ConfigManager