- What is HTTP?
- What is a Protocol & What is Hyper Text?
- HTTP Requests and Responses
- Components of a Request and Response
- HTTP Methods
- HTTP Status
- httpstatus.es
- Explain different groups (2xx ok, 3xx redirect, 4xx client error, 5xx server error)
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 | |
use WP_Error; | |
use App\Exceptions\RemoteCallException; | |
function remote_get($url, $args) | |
{ | |
$result = wp_remote_get($url, $args); | |
if ($result instanceOf WP_Error) { | |
$errorCode = current(array_keys($result->errors)); |
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
var di = function() { | |
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; | |
var ARGUMENT_NAMES = /([^\s,]+)/g; | |
var deps = {}; | |
var getParamNames = function(func) { | |
var fnStr = func.toString().replace(STRIP_COMMENTS, ''); | |
var result = fnStr.slice(fnStr.indexOf('(')+1, fnStr.indexOf(')')).match(ARGUMENT_NAMES); | |
if(result === null) { |
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
* @param array $options | |
* @return array An array of subscription info |
I hereby claim:
- I am jdpedrie on github.
- I am jdp (https://keybase.io/jdp) on keybase.
- I have a public key whose fingerprint is 6FF6 430F 4653 852D 8EAC 423A 0D9F 0136 5004 6559
To claim this, I am signing this object:
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 | |
use Google\Cloud\Datastore\DatastoreClient; | |
$datastore = new DatastoreClient([ | |
'projectId' => $projectId | |
]); | |
// I aliased $_POST, but you don't need to if you don't want to. | |
// This is where I'd perform all the validation and sanitation on the data that was given by the user. |
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 | |
/** | |
* Copyright 2016 Google Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
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
source <(kubectl completion zsh) | |
alias k='kubectl' | |
alias kgp='k get pods' | |
alias kgpw='k get pods --watch' | |
alias ka="k config current-context" | |
alias kgs="k get services" | |
# List pod images | |
alias kgpi='kubectl get pods -o=jsonpath='\''{range .items[*]}{"\n"}{.metadata.name}{":\t"}{range .spec.containers[*]}{.image}{", "}{end}{end}'\'' | sort' |
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
{ | |
"uuid": "7d2e2a2c-4983-4528-b883-491748f274b6", | |
"raw": "...", | |
"category_id": 1000904, | |
"category_path": [ | |
1000914, | |
4188432, | |
1000849, | |
1000904 | |
], |
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
package ctypes | |
import "encoding/json" | |
type Nilable[T any] struct { | |
val *T | |
isSet bool | |
} | |
func NewNilable[T any](v T) Nilable[T] { |