Skip to content

Instantly share code, notes, and snippets.

View muescha's full-sized avatar

Muescha muescha

View GitHub Profile
View install-paperless-ngx_macos.sh
#!/usr/bin/env bash
ask() {
while true ; do
if [[ -z $3 ]] ; then
read -r -p "$1 [$2]: " result
else
read -r -p "$1 ($3) [$2]: " result
fi
if [[ -z $result ]]; then
@muescha
muescha / docs.json
Created November 21, 2022 09:58
/Applications/Hammerspoon.app/Contents/Resources/docs.json
View docs.json
This file has been truncated, but you can view the full file.
[
{
"Command": [],
"Constant": [
{
"def": "hs.configdir",
"desc": "A string containing Hammerspoon's configuration directory. Typically `~/.hammerspoon/`",
"doc": "A string containing Hammerspoon's configuration directory. Typically `~/.hammerspoon/`",
"file": "extensions/_coresetup/_coresetup.lua",
"lineno": "44",
@muescha
muescha / list-all-SourceNode-uniq.txt
Created July 25, 2020 19:41
list of type SourceNode created by retext-syntax-urls in the Gatsby repo
View list-all-SourceNode-uniq.txt
😉.)
‘gatsby-node.js
“Deployment.
“Html.js
“Next.
“Online.
“Production.
“and.
“out-of-the-box.
View String+isFirstLetters.swift
import Foundation
extension String {
func isFirstLetters(count: Int, of characterSet: CharacterSet) -> Bool {
guard characters.count >= count else {
return false
}
let firstLetters = substring(to: index(startIndex, offsetBy: count))
View CitiesEnumProtocol.swift
protocol LocationProtocol {
// func address() -> String
}
extension LocationProtocol {
}
enum Cities{}
@muescha
muescha / IDPCastable.MD
Created January 13, 2017 05:25
Castable
View IDPCastable.MD

https://github.com/idapgroup/IDPCastable

i like the idea of Castable. but i don't like to have too much public functions without an "Namespace" aka Class flying around like cast, castable, match.

i prefer it more encapsulated in one class and also to prefix the first closure also with match to get it uniform with the other matches

i rewrite the class like this:

View Bookmarks.md

==JSON==

Add Encodable Protocol to an Object to create JSON ( Encodable useful in combination with Argo)

View gist:395affe3e832503e5c03

Updating rbenv Ruby to use newer OpenSSL versions

rbenv/ruby-build don’t use Homebrew-installed versions of OpenSSL — instead, they on OS X's built-in ancient version.

This can throw OpenSSL::SSL::SSLErrors when talking to websites that enforce newer SSL/TLS protocols and ciphersuites.


1: Dependencies

@muescha
muescha / .htaccess
Last active August 29, 2015 14:08 — forked from MicahChalmer/.htaccess
View .htaccess
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
</IfModule>
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Options +FollowSymLinks +ExecCGI
RewriteEngine On