Skip to content

Instantly share code, notes, and snippets.

View joaomarcos96's full-sized avatar

João Marcos joaomarcos96

View GitHub Profile
@joaomarcos96
joaomarcos96 / arch_faster_rubocop_vscode.md
Last active February 8, 2021 13:10
Faster RuboCop for VSCode in Arch Linux
@joaomarcos96
joaomarcos96 / pre-push.sh
Last active February 8, 2021 13:10
git pre-push hook to confirm push force or delete on any branch
#!/bin/sh
current_branch=$(git rev-parse --abbrev-ref HEAD)
push_command=$(ps -ocommand= -p $PPID)
is_destructive='force|delete|\-f'
confirm_destructive_action(){
read -p 'Are you sure you want to push to "'$current_branch'" ? (y/n): ' -n 1 -r < /dev/tty
@joaomarcos96
joaomarcos96 / ExportOptions.plist
Last active March 19, 2021 21:34
iOS automated deploy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>destination</key>
<string>upload</string>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>MyTeamID</string> <!-- your team ID, something like "AB12C345DE" -->

Installing Ruby 2.3.x in Arch Linux

Have openssl-1.0 and gcc installed

sudo pacman -S --needed openssl-1.0 gcc

Install Ruby 2.3.x with gcc and openssl path defined

@joaomarcos96
joaomarcos96 / pagination_example.dart
Created September 16, 2020 13:15
Flutter pagination
class Pagination<T> {
Pagination({
this.page,
this.perPage,
this.total,
this.totalPages,
this.collection,
});
int page;
@joaomarcos96
joaomarcos96 / Manjaro-Post-Install.md
Last active February 13, 2023 21:18
Manjaro Post Install
@joaomarcos96
joaomarcos96 / settings.jsonc
Last active April 11, 2024 19:05
Visual Studio Code user settings
{
// Highlight matching tag config
// "highlight-matching-tag.enabled": true,
// Breadcrumbs config
"breadcrumbs.enabled": true,
// Diff editor config
"diffEditor.ignoreTrimWhitespace": false,
@joaomarcos96
joaomarcos96 / .editorconfig
Last active May 23, 2020 15:45
.editorconfig for .NET
[*.{appxmanifest,asax,ascx,aspx,build,cs,cshtml,dtd,fs,fsi,fsscript,fsx,master,ml,mli,nuspec,razor,resw,resx,skin,vb,xaml,xamlx,xoml,xsd}]
indent_style=space
indent_size=4
tab_width=4
trim_trailing_whitespace=true
insert_final_newline=true
charset=utf-8
end_of_line=lf
@joaomarcos96
joaomarcos96 / Xamarin iOS - Stream to UIImage.cs
Created August 26, 2019 13:40
Xamarin iOS - Stream to UIImage
using (var imageData = NSData.FromStream(myStream))
using (var image = UIImage.LoadFromData(imageData))
{
myUiImageView.Image = image;
}