I hereby claim:
- I am bezhermoso on github.
- I am bez (https://keybase.io/bez) on keybase.
- I have a public key whose fingerprint is 029D BA21 BA36 3EF3 50C5 E6F6 55BD EC09 7B88 5413
To claim this, I am signing this object:
function jump-to-git-root { | |
local _root_dir="$(git rev-parse --show-toplevel 2>/dev/null)" | |
if [[ $? -gt 0 ]]; then | |
>&2 echo 'Not a Git repo!' | |
exit 1 | |
fi | |
local _pwd=$(pwd) | |
if [[ $_pwd = $_root_dir ]]; then | |
# Handle submodules: | |
# If parent dir is also managed under Git then we are in a submodule. |
# Mnemonic: `gr` == `git root` | |
# IMPORTANT: Use single-quotes. Otherwise, the sub-command will expand *now* at definition! | |
alias gr='cd $(git rev-parse --show-toplevel)' |
#!/usr/bin/env bash | |
brew list | while read formula; do | |
command="brew install $formula" | |
flags="$(brew info $formula | grep -i "built from source .* with:" | cut -f 11- -d' ')" | |
echo $command $flags | |
done | |
# Usage: | |
# ./brew-inventory.sh >! brew-formulae.txt |
"use strict"; | |
const readline = require('readline'); | |
const EventEmitter = require('events'); | |
const dataPattern = /^['"|](.*)['"|]$/; | |
const trimData = function (str) { | |
return String(str).trim().replace(dataPattern, '$1'); | |
} |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# Usage: `calctime <start> <end>` i.e. `calctime 08:20 11:22`. | |
# Will prompt for start time and end time if not provided. | |
# DON'T specify AM or PM. Support is still @todo. | |
# However, this will try its best to guess the proper duration i.e. `calctime 08:00 1:00` will print out `Duration: 5 hours`. | |
from=$1 | |
to=$2 |
I hereby claim:
To claim this, I am signing this object:
diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php | |
index 9979b73..3dce650 100644 | |
--- a/core/lib/Drupal/Core/Routing/UrlGenerator.php | |
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php | |
@@ -340,7 +340,10 @@ public function generateFromRoute($name, $parameters = array(), $options = array | |
$base_url = $this->context->getBaseUrl(); | |
$absolute = !empty($options['absolute']); | |
- if (!$absolute || !$host = $this->context->getHost()) { | |
+ |
# Close all notifications | |
my closeNotifications() | |
on closeNotifications() | |
tell application "System Events" to tell process "Notification Center" | |
set theWindows to every window | |
repeat with i from 1 to number of items in theWindows | |
set this_item to item i of theWindows | |
try | |
click button 1 of this_item |
my closeNotifications() | |
on closeNotifications() | |
tell application "System Events" | |
tell process "Notification Center" | |
set theWindows to every window | |
repeat with i from 1 to number of items in theWindows | |
set this_item to item i of theWindows | |
try | |
click button 1 of this_item |