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
{ | |
"tools": [ | |
{ | |
"type": "function", | |
"function": { | |
"name": "codebase_search", | |
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.", | |
"parameters": { | |
"type": "object", | |
"properties": { |
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
# Get the current hour | |
current_hour=$(date +"%H") | |
# Determine the greeting based on the current hour | |
if [ "$current_hour" -lt 12 ]; then | |
greeting="Good morning" | |
elif [ "$current_hour" -lt 18 ]; then | |
greeting="Good afternoon" | |
else | |
greeting="Good evening" |
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
# settings we’re about to change | |
osascript -e 'tell application "System Preferences" to quit' | |
# Ask for the administrator password upfront | |
sudo -v | |
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished | |
while true; do | |
sudo -n true | |
sleep 60 | |
kill -0 "$$" || exit |
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 | |
# Update and upgrade Homebrew | |
echo "Updating Homebrew..." | |
brew update | |
brew upgrade | |
# Install nvm (Node Version Manager) | |
echo "Installing nvm..." |
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
exports.createResolvers = function({ actions,cache,createNodeId,createResolvers,store,reporter }) { | |
const { createNode } = actions; | |
createResolvers({ | |
HATCH_ContentMediaItemType: { | |
imageFile: { | |
type: `File`, | |
resolve(source, args, context, info) { | |
return createRemoteFileNode({ | |
url: source.filePath, |
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 | |
add_filter('wpseo_schema_website', 'example_change_website'); | |
function example_change_website($data) | |
{ | |
if ($data['potentialAction']) { | |
foreach ($data['potentialAction'] as $key => $value) { | |
# code... | |
if ($value['@type'] && $value['@type'] == 'SearchAction') { | |
unset($data['potentialAction'][$key]); |
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 { onError } from 'apollo-link-error'; | |
import { Observable } from 'apollo-link'; | |
import { buildAuthHeader } from 'utils/requests'; | |
import { getProvider as getGlobalProvider } from 'GlobalState'; | |
let isFetchingToken = false; | |
let tokenSubscribers = []; | |
function subscribeTokenRefresh(cb) { | |
tokenSubscribers.push(cb); |
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
function ProviderComposer({ contexts, children }) { | |
return contexts.reduceRight( | |
(kids, parent) => | |
React.cloneElement(parent, { | |
children: kids, | |
}), | |
children | |
); | |
} |
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
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.3.0/workbox-sw.js'); | |
//{clientsClaim: true} | |
//console.log('this is my custom service worker'); | |
const revision = 'version-1'; | |
const longerRevision = 'static-1'; | |
//Config | |
workbox.setConfig({ | |
debug: true |
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
version: '3' | |
services: | |
wordpress: | |
depends_on: | |
- db | |
image: wordpress:4.9.4 | |
restart: always | |
volumes: | |
- ./wp-content:/var/www/html/wp-content | |
environment: |
NewerOlder