This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color "blame"] | |
highlightRecent = 234, 23 month ago, 235, 22 month ago, 236, 21 month ago, 237, 20 month ago, 238, 19 month ago, 239, 18 month ago, 240, 17 month ago, 241, 16 month ago, 242, 15 month ago, 243, 14 month ago, 244, 13 month ago, 245, 12 month ago, 246, 11 month ago, 247, 10 month ago, 248, 9 month ago, 249, 8 month ago, 250, 7 month ago, 251, 6 month ago, 252, 5 month ago, 253, 4 month ago, 254, 3 month ago, 231, 2 month ago, 230, 1 month ago, 229, 3 weeks ago, 228, 2 weeks ago, 227, 1 week ago, 226 | |
[blame] | |
coloring = highlightRecent | |
date = human |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function timeout(time = 200) { | |
return new Promise((resolve) => { | |
setTimeout(resolve, time); | |
}) | |
} | |
/** | |
* Prepare archiving, making sure columns are the correct ones. | |
* | |
* @param contents every column names to treat (may be only a part) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeService | |
def call(some_value, bypass_some_method4 = false) | |
pipe( | |
some_value, | |
:some_method1, | |
:some_method2, | |
-> (value) { value * 2 }, | |
bypass_some_method4 ? :noop : :some_method4, | |
:some_method5 | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# Look for non-breaking spaces hidden in code, refuse | |
# to commit if there are some. This hook depends on the | |
# great ripgrep (https://github.com/BurntSushi/ripgrep). | |
# You can use bash if you prefere it over zsh, and ag | |
# over rg. | |
! rg --colors 'match:bg:yellow' -C 1 ' ' $(git ls-files) && exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const IMAGE_REGEXP = /\.(?:jpe?g|png)$/; // https://regexper.com/#%2F%5C.%28%3F%3Ajpe%3Fg%7Cpng%29%24%2F | |
const ImageminWebpWebpackPlugin = require('imagemin-webp-webpack-plugin'); | |
const { environment } = require('@rails/webpacker'); | |
environment.plugins.prepend('ImageminWebpWebpackPlugin', new ImageminWebpWebpackPlugin({ | |
silent: false, | |
detailedLogs: true, | |
})); | |
const manifest = environment.plugins.get('Manifest') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Forked from: https://gist.github.com/jdennes/7013672. | |
# | |
# I improved the request output! | |
curl -G https://api.github.com/search/repositories \ | |
--data-urlencode 'q=stars:>1000' \ | |
--data-urlencode 'sort=stars' \ | |
--data-urlencode 'order=desc' \ | |
-H 'Accept: application/vnd.github.preview' \ | |
| jq --raw-output '.items | .[] | (.full_name + " (" + (.stargazers_count | tostring) + ")")' \ | |
| cat -n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Copyright (c) 2019 Ulysse Buonomo <buonomo.ulysse@gmail.com> (MIT license) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/USER.keys | |
https://github.com/USER.gpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiddle' | |
color_iter = DATA.readlines.map(&:chomp).map { |i| | |
i = i.to_i(16) | |
[(i >> 16) & 0xFF, (i >> 8) & 0xFF, i & 0xFF, 255] | |
}.each | |
SIZEOF_HEAP_PAGE_HEADER_STRUCT = Fiddle::SIZEOF_VOIDP | |
SIZEOF_RVALUE = 40 |
NewerOlder