Skip to content

Instantly share code, notes, and snippets.

View leonamtv's full-sized avatar
📝
Studying....

Leo Vasconcelos leonamtv

📝
Studying....
View GitHub Profile
@nhevia
nhevia / semantic_git_commit_count.sh
Created August 21, 2020 11:16
Counts semantic git commits
git log --pretty=oneline --no-merges --since 2019/01/01 --until 2021/12/31 | cut -d " " -f 2 |\
cut -d "(" -f 1 | cut -d ":" -f 1 | sort -r | uniq -c | sort -nr -k1
@u-ndefine
u-ndefine / 50_lines.pde
Last active April 25, 2024 12:07
Sketch of my generative art, "50 Lines"
float decel(float x) { // as an easing function
return 1-(x-1)*(x-1);
}
void setup() {
background(255);
size(750,750,P2D);
PImage img = loadImage("image.png");
strokeWeight(2);
noFill();
[alias]
ci = commit
co = checkout
cm = checkout master
cb = checkout -b
st = status -sb
sf = show --name-only
lg = log --pretty=format:'%Cred%h%Creset %C(bold)%cr%Creset %Cgreen<%an>%Creset %s' --max-count=30
incoming = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' ..@{u})
outgoing = !(git fetch --quiet && git log --pretty=format:'%C(yellow)%h %C(white)- %C(red)%an %C(white)- %C(cyan)%d%Creset %s %C(white)- %ar%Creset' @{u}..)
@Thann
Thann / gitlab-dark.css
Last active June 26, 2020 15:05
Dark Theme for Gitlab
/* thann */
.info-well {
background-color: #272727;
border-color: #555;
color: #777;
}
.well-segment {
border-bottom-color: #555 !important;
}
.count,
@systemed
systemed / gist:be2d6bb242d2fa497b5d93dcafe85f0c
Last active April 10, 2024 03:49
Routing algorithm implementations
(Dijkstra and plain A* are generally not included here as there are thousands of
implementations, though I've made an exception for rare Ruby and Crystal versions,
and for Thor, Mapzen's enhanced A*. )
A* Ruby https://github.com/georgian-se/shortest-path
A* Crystal https://github.com/petoem/a-star.cr
A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla
NBA* JS https://github.com/anvaka/ngraph.path
NBA* Java https://github.com/coderodde/GraphSearchPal
NBA* Java https://github.com/coderodde/FunkyPathfinding
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 18, 2024 09:22
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@adrianoluis
adrianoluis / DocumentUtil.java
Last active May 4, 2024 16:12
Utility class to validate CPF and CNPJ document types. For CPF use isValidSsn and for CNPJ use isValidTfn. Added to repo https://github.com/adrianoluis/misc-tools
public class DocumentUtil {
// CPF
private static final int[] WEIGHT_SSN = {11, 10, 9, 8, 7, 6, 5, 4, 3, 2};
// CNPJ
private static final int[] WEIGHT_TFN = {6, 5, 4, 3, 2, 9, 8, 7, 6, 5, 4, 3, 2};
private static int sum(int[] weight, char[] numbers, int length) {
if (length <= 0) return 0;
[
{
"name":"ABAP",
"type":"programming",
"extensions":[
".abap"
]
},
{
"name":"AGS Script",
@MauricioMoraes
MauricioMoraes / brazilian_phone_mask_with_area_code.js
Last active May 16, 2022 04:10
Mask for 8 or 9 digit phones in brazilian format with area code (ddd) - Using Jquery.inputmask plugin
// Using jquery.inputmask: https://github.com/RobinHerbots/jquery.inputmask
// For 8 digit phone fields, the mask is like this: (99) 9999-9999
// For 9 digit phone fields the mask is like this: (99) 99999-9999
function setupPhoneMaskOnField(selector){
var inputElement = $(selector)
setCorrectPhoneMask(inputElement);
inputElement.on('input, keyup', function(){
setCorrectPhoneMask(inputElement);
});
@kasperpeulen
kasperpeulen / README.md
Last active February 20, 2024 02:52
How to pretty-print JSON using Dart.