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
# Clone llama.cpp | |
git clone https://github.com/ggerganov/llama.cpp.git | |
cd llama.cpp | |
# Build it | |
LLAMA_METAL=1 make | |
# Download model | |
export MODEL=llama-2-13b-chat.ggmlv3.q4_0.bin | |
wget "https://huggingface.co/TheBloke/Llama-2-13B-chat-GGML/resolve/main/${MODEL}" |
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
# Install `dnsmasq` and configure for *.dev domains | |
$ brew install dnsmasq | |
$ vim /usr/local/etc/dnsmasq.conf | |
# Reload configuration and clear cache | |
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist | |
$ dscacheutil -flushcache |
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
################################## | |
# WORDPRESS NGINX CONFIGURATIONS | |
################################## | |
# /etc/nginx/wordpress.conf | |
# | |
# Contains a common configuration for use by nginx on a WordPress | |
# installation. This file should be included in any WordPress site | |
# nginx virtual host config located in sites-available with the following line: | |
# | |
# include /etc/nginx/wordpress.config; |
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
<?php | |
/** | |
* Whitelist embedded links in the REST API responses | |
* | |
* This is often useful if you want to only get specified resources embedded along with the | |
* main resources, rather than the "all of nothing" approach of passing `?_embed` to the API request. | |
* | |
* You can either pass a comma seperated list of relationships or an array of string via the `_embed_include` query param. | |
* |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<?php | |
class MyPlugin { | |
/** | |
* Add this at top of your plugin class constructor or whichever method in your class you use to bootstrap your plugin. | |
* e.g. public static function bootstrap() | |
*/ | |
public static function bootstrap() { | |
if ( version_compare( '5.3', phpversion(), '>' ) ) { |
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
<?php | |
/* | |
* Auto-login script to save having to manually login when developing a WP site. | |
* | |
* Place in wp-content/mu-plugins and remember to add to .gitignore for safety | |
* | |
* Add the DEV_GET_PARAMETER to the url to activate the script and login for you | |
* e.g. http://localhost:8080/?dev | |
*/ | |