This is a wonderful Gist!
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
import { Elysia, ErrorHandler, t } from "elysia"; | |
import { logger } from "./lib/logger"; | |
import bearer from "@elysiajs/bearer"; | |
import config from "./lib/config"; | |
import swagger from "@elysiajs/swagger"; | |
import { OverlandSchema } from "./lib/overland"; | |
class UnauthorizedError extends Error { | |
code = "UNAUTHORIZED"; | |
status = 403; |
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
// I needed flatuicolors.com as Sass variables... | |
// In your console, run: | |
$('.color').get().map(function(el) { return "$" + el.classList[1] + ": " + el.getAttribute('data-clipboard-text') + ';' }).join('\r\n'); | |
// Output: | |
// $turquoise: #1abc9c; | |
// $emerland: #2ecc71; | |
// $peter-river: #3498db; | |
// $amethyst: #9b59b6; | |
// $wet-asphalt: #34495e; |
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 'mail' | |
require 'csv' | |
FILE = ARGV[0] | |
Mail.defaults do | |
delivery_method :smtp, { | |
address: '', | |
port: 587, | |
domain: '', | |
user_name: '', |
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
name: My Cron Action | |
on: | |
schedule: | |
- cron: '*/15 * * * *' | |
jobs: | |
hello: | |
runs-on: ubuntu-latest | |
steps: | |
# If you need access to the source code of the repo | |
- uses: actions/checkout@v1 |
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 sh | |
set -e | |
echo "Fetching fonts from Apple..." | |
curl -o /tmp/SF-Font.dmg https://developer.apple.com/design/downloads/SF-Font.dmg | |
hdiutil attach -nobrowse -quiet -noverify -noautoopen -mountpoint /Volumes/SF-Font /tmp/SF-Font.dmg | |
echo "Installing fonts..." | |
cp -R /Volumes/SF-Font/. /Library/Fonts/ |
The error handling for async/await with try/catch always bugs me. Go to the rescue?
function to(promise) {
return promise
.then(res => [null, data])
.catch(err => [err])
}
async function doIt() {
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
sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app |
NewerOlder