Skip to content

Instantly share code, notes, and snippets.

View jostyee's full-sized avatar
💭
脑壳疼

Josta Yee jostyee

💭
脑壳疼
  • Singapore
View GitHub Profile
#!/bin/bash
export NGINX_VERSION="1.31.3"
export PCRE2_VERSION="10.47"
export OPENSSL_VERSION="4.0.1"
export SPNEGO_VERSION="1.1.3"
export GEOIP2_VERSION="3.4"
export VERSION_NGINX="nginx-${NGINX_VERSION}"
export VERSION_PCRE2="pcre2-${PCRE2_VERSION}"
export VERSION_OPENSSL="openssl-${OPENSSL_VERSION}"
@sharpner
sharpner / goclone
Created August 14, 2015 09:32
clone and symlink go open source project
#/!bin/bash
repository=github.com
if [ -z "$GOPATH" ] ; then
echo '$GOPATH not set.'
exit 1
fi
cd $GOPATH
@mholt
mholt / stringscontext.go
Last active December 15, 2021 08:48
Functions from the 'strings' package as template actions. Feel free to copy+paste into your project as a starting point.
// Functions from Go's strings package usable as template actions
// with text/template.
//
// This approach assumes you have some context type as a receiver,
// but if you just need the functions check out the FuncMap variant
// below.
//
// Commented functions are not deemed useful in template actions.
// Haven't actually used this, but this is one possible way of doing it.
// Another option is to fill a FuncMap with most of the strings package.
{
"Name": "Elvis",
"Location": "Memphis"
}
@dansheffler
dansheffler / zettel_link.tmLanguage
Last active May 7, 2021 21:31
A syntax definition for Sublime Text 3 that extends Academic Markdown to include my own wiki-style links
@ericlagergren
ericlagergren / index.gohtml
Last active December 22, 2023 17:51
Hot-reloading / hot-swapping live template files in Go
My name is {{.Name}} and I'm {{.Age}} years old!!
@derickfay
derickfay / TE recipient
Last active December 9, 2017 06:39
TextExpander snippet to add recipient's name to email
-- TextExpander snippet to add recipient's name to email
-- based on http://macsparky.com/blog/2015/6/automatically-add-recipients-name-to-email-with-textexapnder [sic]
-- updated to handle hyphenated first names properly
-- ( Original version would return Young for Young-Hee . This version returns Young-Hee. )
set theResult to ""
tell application "System Events"
tell process "Mail"
tell text field "To:" of window 1
# Free Will Problem #
Under this heading I mean to separate off those issues of
[[Freedom]] that have to do with the *metaphysical* problem of free
will and determinism. As opposed to political or theological
freedom. This is also distinct from the problem of the compatibility
of free will and divine foreknowledge.
According to [[Peter van Inwagen]]'s proposal we should understand
the "problem of free will" as (I am glossing):
@Jamesits
Jamesits / discoveryd_checker.sh
Last active August 29, 2015 14:19
Check if discoveryd on OS X 10.10.3 has too high CPU usage and restart it.
#!/bin/bash
# Copyright (c) 2015, James Swineson <jamesswineson@gmail.com>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY