Skip to content

Instantly share code, notes, and snippets.

View mlbright's full-sized avatar

Martin-Louis Bright mlbright

  • Toronto
  • 08:33 (UTC -04:00)
View GitHub Profile
@nickytonline
nickytonline / .gitconfig
Last active February 17, 2021 03:34
Git Aliases
alias.a add .
alias.aliases config --get-regexp alias
alias.bi bisect
alias.ci commit -m
alias.co checkout
alias.colast checkout -
alias.db branch -D
alias.laf fsck --lost-found
alias.last log -1 HEAD
alias.nb checkout -b
@alexrqs
alexrqs / update-tags.md
Last active February 5, 2020 18:30
Update github tags with new commits
Create a branch with the tag
	git branch {tagname}-branch {tagname}
	git checkout {tagname}-branch
Include the fix manually if it's just a change ....
	git add .
	git ci -m "Fix included" # or cherry-pick the commit, whatever is easier
	git cherry-pick {num_commit}
@brianmed
brianmed / minion_add.pl
Created June 21, 2016 13:06
Minimal Mojolicious and Minion example
use Mojolicious::Lite;
plugin Minion => {SQLite => 'jobs.sqlite'};
app->secrets(['06650c45-b2db-45ad-9fce-7e64702208ce']);
app->minion->add_task(add => sub {
my $job = shift;
my $number = shift;
@baldurk
baldurk / sourceindex.md
Last active January 25, 2025 19:00
Source indexing for github projects

Symbol Servers

I'm assuming you are familiar with symbol servers - you might not have one set up yourself for your own projects, but you probably use Microsoft's public symbol server for downloading symbols for system DLLs.

For your own projects it might be useful to set up a symbol server - I won't go into how you do that here since it's well documented elsewhere, but basically you just set up a folder somewhere - say X:\symbols\ or \servername\symbols or even http://servername.foo/symbols/ which has a defined tree structure:

symbols/
symbols/mymodule.pdb/
symbols/mymodule.pdb/123456789012345678901234567890122/
#!/usr/bin/env perl
# Copyright 2015 by David Golden
# Licensed under CC0 https://creativecommons.org/publicdomain/zero/1.0/
# Updated 2016-03-01:
# - more variation in organzations selected; you will want to customize this yourself
# - splits out wishlists differently/correctly
# - reports only PRs unless --all is specified
use v5.10;
use strict;
use warnings;
@larsxschneider
larsxschneider / lfs-filesize.sh
Last active January 20, 2016 15:06
Print size of the LFS files in a repo and order by size
git-lfs ls-files | cut -c 14- | tr '\n' '\0' | xargs -0 ls -l | awk '{$1=$2=$3=$4=$6=$7=$8="";print}' | sort -n
@ingydotnet
ingydotnet / word-parse.pl
Last active November 26, 2015 04:57
Parse words from a string of smushed together words with a single regexp
#!/usr/bin/env perl
use strict;
# Get all the letters from stdin:
my $input = do {local $/; <>};
$input =~ s/[^a-zA-Z]//g;
# All 3+ letter English words, longest to shortest:
my @long = grep {length > 2}
sort {length $b <=> length $a}
@magnetikonline
magnetikonline / README.md
Last active April 14, 2025 15:32
Bash string manipulation cheatsheet.

Bash string manipulation cheatsheet

Assignment
Assign value to variable if variable is not already set, value is returned.

Combine with a : no-op to discard/ignore return value.
${variable="value"}
: ${variable="value"}
@bbkr
bbkr / README.txt
Last active January 19, 2019 08:05
Asynchronous junkie
I love Perl 6 asynchronous features. They are so easy to use and can give instant boost by changing few lines of code that I got addicted to them. I became asynchronous junkie. And finally overdosed. Here is my story...
I was processing a document that was divided into chapters, sub-chapters, sub-sub-chapters and so on. Parsed to data structure it looked like this:
my %document = (
'1' => {
'1.1' => 'Lorem ipsum',
'1.2' => {
'1.2.1' => 'Lorem ipsum',
'1.2.2' => 'Lorem ipsum'
use Mojolicious::Lite;
use DBM::Deep;
use Mojo::JWT;
plugin 'Bcrypt';
plugin 'Minion' => {SQLite => 'minion.db'};
helper users => sub { state $db = DBM::Deep->new('users.db') };