See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| 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 |
| 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 */ | |
| .info-well { | |
| background-color: #272727; | |
| border-color: #555; | |
| color: #777; | |
| } | |
| .well-segment { | |
| border-bottom-color: #555 !important; | |
| } | |
| .count, |
| (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 |
| 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", |
| // 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); | |
| }); |
#dart:convert example
How to pretty-print JSON using Dart.
How to display JSON in an easy-to-read (for human readers) format.
Main library: dart:convert
Main element: JsonEncoder.withIndent
Gist: https://gist.github.com/kasperpeulen/d61029fc0bc6cd104602