This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Mais detalhes em https://docs.microsoft.com/pt-br/ef/core/modeling/value-conversions | |
private static readonly JsonSerializerSettings _jsonSettings = new JsonSerializerSettings { NullValueHandling= NullValueHandling.Ignore }; | |
public class UserPermissionConfiguration: IEntityTypeConfiguration<UserPermission> | |
{ | |
public void Configure(EntityTypeBuilder<UserPermission> builder) | |
{ | |
builder.ToTable("UserPermission"); | |
builder.Property(b => b.Panes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class Base32 { | |
// the valid chars for the encoding | |
private static string ValidChars = "QAZ2WSX3" + "EDC4RFV5" + "TGB6YHN7" + "UJM8K9LP"; | |
/// <summary> | |
/// Converts an array of bytes to a Base32-k string. | |
/// </summary> | |
public static string ToBase32String(byte[] bytes) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Written by Paul Seal. Licensed under MIT. Free for private and commercial uses. | |
using System; | |
using System.Text.RegularExpressions; | |
using CodeShare.Library.Passwords; | |
public class Program | |
{ | |
public static void Main() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Giovanni Bassi | |
email = giggio@email | |
[diff] | |
indentHeuristic = true | |
submodule = log | |
[color] | |
diff = always | |
interactive = always | |
status = always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let uploadEngine = new plupload.Uploader({ | |
runtimes: 'html5', | |
url: `${apiUrl}/upload`, | |
multiple_queues: true, | |
multi_selection: true, | |
browse_button: 'btnAddFoto', | |
multipart_params: { | |
'File': '${filename}', | |
}, | |
filters: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Tz | |
{ | |
/// <summary> | |
/// Maintain date time values from UTC DateTime but change her offset for espefict time zone. | |
/// </summary> | |
/// <param name="localDate">DateTime in UTC</param> | |
/// <param name="timeZoneId">IANA time zone format</param> | |
/// <returns></returns> | |
public static DateTime ShiftUtcDateTimeToTimeZoneOffSet(DateTime localDate, string timeZoneId) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Selected device en1, address 192.168.0.7, port 53178 for outgoing packets | |
Tracing the path to email-smtp.us-east-1.amazonaws.com (184.73.246.167) on TCP port 587 (submission), 30 hops max | |
1 192.168.0.1 3.696 ms 1.897 ms 2.063 ms | |
2 166.253.222.177.giganetbandalarga.com.br (177.222.253.166) 11.787 ms 5.113 ms 8.313 ms | |
3 * * * | |
4 * * * | |
5 * * * | |
6 * * * | |
7 * * * | |
8 * * * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Runtime.InteropServices; | |
// Referências: | |
// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724423(v=vs.85).aspx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"getAdjustmentRules": [ | |
{ | |
"DateStart": "0001-01-01T00:00:00", | |
"DateEnd": "1914-01-01T00:00:00", | |
"DaylightDelta": "00:00:00", | |
"DaylightTransitionStart": { | |
"TimeOfDay": "0001-01-01T00:00:00", | |
"Month": 1, | |
"Week": 1, | |
"Day": 1, |