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
#!/bin/bash | |
# You can call this script like this: | |
# $./brightness.sh up | |
# $./brightness.sh down | |
# Based on sebastiencs' script (https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a) | |
function get_brightness { | |
xbacklight -get |
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
<span lang="face with tears of joy"> 😂 </span> | |
<span lang="grinning face with smiling eyes"> 😄 </span> | |
<span lang="grinning face with sweat"> 😅 </span> | |
<span lang="face with rolling eyes"> 🙄 </span> | |
<span lang="smirking face"> 😏 </span> | |
<span lang="smiling face with halo"> 😇 </span> | |
<span lang="grinning face"> 😀 </span> | |
<span lang="squinting face with tongue"> 😝 </span> | |
<span lang="grinning face with big eyes"> 😃 </span> | |
<span lang="unamused face"> 😒 </span> |
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
<span lang="face with tears of joy"> 😂 </span> | |
<span lang="grinning face with smiling eyes"> 😄 </span> | |
<span lang="grinning face with sweat"> 😅 </span> | |
<span lang="face with rolling eyes"> 🙄 </span> | |
<span lang="smirking face"> 😏 </span> | |
<span lang="smiling face with halo"> 😇 </span> | |
<span lang="grinning face"> 😀 </span> | |
<span lang="squinting face with tongue"> 😝 </span> | |
<span lang="grinning face with big eyes"> 😃 </span> | |
<span lang="unamused face"> 😒 </span> |
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
// Code | |
export const pickDeep = (obj: Dict<any>, key: string) => | |
hasKey(obj, key) ? obj[key] : key.split(".").reduce((o, k) => o?.[k], obj); | |
export const transform = (from: Dict<any>, to: Dict<any>) => | |
keys(to).reduce((o: Dict<any>, k) => { | |
const t = to[k]; // for each key that we want in the new object, get the transformer | |
o[k] = Array.isArray(t) // check if the transformer is an array | |
? typeof last(t) === "object" // if so, check if the last element of the transformer array is another 'to' object |