Skip to content

Instantly share code, notes, and snippets.

View daltonbr's full-sized avatar
🎮
Brighton - UK

Dalton Lima daltonbr

🎮
Brighton - UK
View GitHub Profile
@daltonbr
daltonbr / LinterVsFormatter.md
Last active October 9, 2024 11:36
A brief discussion about Linters and Formatters 🧹
@daltonbr
daltonbr / badges.md
Last active November 19, 2024 08:27
Concise, consistent, and legible badges
@daltonbr
daltonbr / nerd_fonts.md
Created March 2, 2024 23:24 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
version: "3"
networks:
default:
driver: macvlan
driver_opts:
parent: enp7s0
ipam:
config:
- subnet: 192.168.1.0/24
@daltonbr
daltonbr / HelpshiftApi.cs
Created December 29, 2023 18:37
Correct CIF in Helpshift
private Dictionary<string, object> GetConversationConfig(Dictionary<string, object> cifDictionary)
{
Dictionary<string, object> configMap = new()
{
//{ "fullPrivacy", MagCenterSettings.HelpshiftConfig.FullPrivacy },
{ "enableContactUs", _helpshiftSettings.GetEnableContactUsSetting(_segmentationPersistedDataAdapter) },
{ "tags", new[] { _helpshiftSettings.GetPayerSubscriberTag(_segmentationPersistedDataAdapter) } }
};
Dictionary<string, string> userId = new()
@daltonbr
daltonbr / HelpshiftApi.cs
Created December 27, 2023 09:10
mapping data to cif dictionary in Helpshift
private Dictionary<string, object> GetConversationConfig(Dictionary<string, object> cifDictionary)
{
Dictionary<string, object> configMap = new()
{
//{ "fullPrivacy", MagCenterSettings.HelpshiftConfig.FullPrivacy },
{ "enableContactUs", _helpshiftSettings.GetEnableContactUsSetting(_segmentationPersistedDataAdapter) },
{ "tags", new[] { _helpshiftSettings.GetPayerSubscriberTag(_segmentationPersistedDataAdapter) } },
};
cifDictionary ??= new Dictionary<string, object>();
@daltonbr
daltonbr / .editorconfig
Created June 6, 2022 16:00 — forked from srmagura/.editorconfig
.editorconfig with some StyleCop rules disabled
[*.cs]
csharp_style_var_for_built_in_types=true:silent
csharp_style_var_when_type_is_apparent=true:silent
csharp_style_var_elsewhere=true:silent
##
## StyleCop.Analyzers
##
# Using directive should appear within a namespace declaration
@daltonbr
daltonbr / Convert .mov or .MP4 to .gif.md
Created February 5, 2022 14:37 — forked from SheldonWangRJT/Convert .mov or .MP4 to .gif.md
Convert Movie(.mov) file to Gif(.gif) file in one command line in Mac Terminal

This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.

Need

Convert .mov/.MP4 to .gif

Reason

As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.

This is not limited to developer, anyone has this need can use this method to convert the files.

@daltonbr
daltonbr / iframe-steady.py
Created September 21, 2021 08:52
Batch reencode video files with FFmpeg - version 1.0 - using python 3.9
#!/usr/bin/env python3
#
# Batch file converter to reencode mp4 videos with a steady fixed i-frame interval (default to 25)
#
# Tested under python 3.9.7
# Requires ffmpeg installed
# On Mac run 'brew install ffmpeg'
#
# You may need to give permission to this script
# $ chmod 700 ./iframe-steady.py
@daltonbr
daltonbr / iframe-probe.py
Created September 13, 2021 10:29 — forked from alastairmccormack/iframe-probe.py
Shows GOP structure for video file using ffmpeg --show-frames output
#!/usr/bin/env python
#
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging.
# Example:
#
# $ iframe-probe.py myvideo.mp4
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED