Skip to content

Instantly share code, notes, and snippets.

View ignaces's full-sized avatar
🏠
Working from home

ignaces

🏠
Working from home
View GitHub Profile
@ignaces
ignaces / .gitconfig
Created August 10, 2022 05:34
personal gitconfig
[user]
email = <redacted>
name = <redacted>
[alias]
hist = log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --all
[alias]
llog = log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative
@ignaces
ignaces / distinct.cs
Created July 23, 2018 15:41
query over + transformers + distinct
public IEnumerable<RD_RelationshipView> Test()
{
using (var db = SessionFactory.OpenSession())
{
RD_RelationshipView clientAlias = null;
var query = db.QueryOver<RD_RelationshipView>(() => clientAlias)
.Select(
Projections.Distinct(
@ignaces
ignaces / sumby.js
Created January 11, 2018 17:05
sumBy loadash function in vanilla javascript
const baseSum = function(array, iteratee) {
let result = undefined;
for (let value of Array.from(array)) {
const current = iteratee(value);
if (current !== undefined) {
result = result === undefined ? current : result + current;
}
}
return result;
};

Useful emoji for git commit messages

If you add emojis to your commit messages for a GitHub repo, they become less boring, and you can convey to kind of change you're adding. See the full set of GitHub supported emojis here (also useful for easy copy&paste via a simple click).

The following is a possible scheme to use:

| emoji | change type | text to use |