Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
{ | |
"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": { |
# 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" |
# 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 |
#!/bin/bash | |
# Update and upgrade Homebrew | |
echo "Updating Homebrew..." | |
brew update | |
brew upgrade | |
# Install nvm (Node Version Manager) | |
echo "Installing nvm..." |
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); |
function ProviderComposer({ contexts, children }) { | |
return contexts.reduceRight( | |
(kids, parent) => | |
React.cloneElement(parent, { | |
children: kids, | |
}), | |
children | |
); | |
} |
// auth-guard.ts | |
import { Injectable } from '@angular/core'; | |
import { | |
CanActivate, | |
Router, | |
ActivatedRouteSnapshot, | |
RouterStateSnapshot | |
} from '@angular/router'; | |
import { AuthService } from './services/auth/auth.service'; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
/** | |
* Use em or rem font-size in Bootstrap 3 | |
*/ | |
@font-size-root: 14px; | |
@font-unit: 0rem; // Pick em or rem here | |
// Convert all variables to em |
Ensure regex button is selected and then type this in the search field. | |
\s*console\.log(.*); |