Skip to content

Instantly share code, notes, and snippets.

View leonj1's full-sized avatar
💭
Coding on the brain

Jose M Leon leonj1

💭
Coding on the brain
View GitHub Profile
Okay, this is a very detailed request! For each of the 20 steps per endpoint, providing an example "payload" can mean different things:
* For DTO definition steps, the "payload" is the C# code of the DTO.
* For controller action/service method steps, it could be a snippet of the C# code or an example HTTP request/response if it's a test step.
* For validation steps, it's typically an invalid HTTP request payload and the expected error response.
I will provide these for the first four endpoints as you listed previously (`GET /stores`, `POST /stores`, `GET /stores/{store_id}`, `DELETE /stores/{store_id}`). This will be quite extensive.
**Important Note on Payloads:**
* Dates in JSON responses are illustrative and should reflect actual `DateTime.UtcNow` or similar.
* `continuation_token` values are placeholders. Real tokens would be opaque strings generated by the persistence layer.
kubectl get nodes
NAME STATUS ROLES AGE VERSION
node1 Ready master 421d v1.15.0
node2 NotReady <none> 302d v1.15.0
node3 NotReady master 421d v1.15.0
node4 Ready <none> 421d v1.15.0
node5 NotReady <none> 302d v1.15.0
node6 Ready master 55d v1.15.3
node7 NotReady master 421d v1.15.0
node8 NotReady <none> 421d v1.15.0
```
$ ~/Downloads/flyway-5.2.4/flyway info
-url=jdbc:mysql://localhost:1234/foo
-user=foowr
-password=p123
-locations=filesystem:/Users/jose/workarea/sql/migration
baseline
info
migrate
# hostvars where each host includes its private ip
"_meta": {
"hostvars": {
"node2.amazonaws.com": {
"private_ip": "10.1.0.77"
},
"node1.amazonaws.com": {
"private_ip": "10.1.0.64"
}
}
00000000: c3bf c398 c3bf c3a0 0010 4a46 4946 0001 ..........JFIF..
00000010: 0100 0001 0001 0000 c3bf c3be 003b 4352 .............;CR
00000020: 4541 544f 523a 2067 642d 6a70 6567 2076 EATOR: gd-jpeg v
00000030: 312e 3020 2875 7369 6e67 2049 4a47 204a 1.0 (using IJG J
00000040: 5045 4720 7638 3029 2c20 7175 616c 6974 PEG v80), qualit
00000050: 7920 3d20 3933 0ac3 bfc3 9b00 4300 0202 y = 93......C...
00000060: 0202 0201 0202 0202 0302 0203 0306 0403 ................
00000070: 0303 0307 0505 0406 0807 0908 0807 0808 ................
00000080: 090a 0d0b 090a 0c0a 0808 0b0f 0b0c 0d0e ................
00000090: 0e0f 0e09 0b10 1110 0e11 0d0e 0e0e c3bf ................
00000000: ffd8 ffe0 0010 4a46 4946 0001 0100 0001 ......JFIF......
00000010: 0001 0000 fffe 003b 4352 4541 544f 523a .......;CREATOR:
00000020: 2067 642d 6a70 6567 2076 312e 3020 2875 gd-jpeg v1.0 (u
00000030: 7369 6e67 2049 4a47 204a 5045 4720 7638 sing IJG JPEG v8
00000040: 3029 2c20 7175 616c 6974 7920 3d20 3933 0), quality = 93
00000050: 0aff db00 4300 0202 0202 0201 0202 0202 ....C...........
00000060: 0302 0203 0306 0403 0303 0307 0505 0406 ................
00000070: 0807 0908 0807 0808 090a 0d0b 090a 0c0a ................
00000080: 0808 0b0f 0b0c 0d0e 0e0f 0e09 0b10 1110 ................
00000090: 0e11 0d0e 0e0e ffdb 0043 0102 0303 0303 .........C......
function* uploadImage(action) {
try {
let _room = yield select(getRoom);
let _user = yield select(getUser);
const {image, fileName} = action.payload;
let headers = {
'Token': _user.token,
'FileName': fileName,
};
const contents = yield call(axios.post, backend + "/image/" + _room.roomId, image, {headers: headers});
import React, {Component} from 'react';
import Dropzone from 'react-dropzone';
class MediaUpload extends Component {
constructor(props) {
super(props);
this.state = {
file: null,
files: [],
generatedFile: ''
#!/bin/bash
set -e
TAG=$1
GIT_MERGE_AUTOEDIT=no
export GIT_MERGE_AUTOEDIT
#git checkout develop
git flow release start ${TAG} || true
@leonj1
leonj1 / kernel_task_cpu_fix
Created July 17, 2018 17:41
Fix kernel_task high CPU usage on OS X
# Boot to recovery mode and disable system integrity protection
csrutil disable
# Reboot to regular mode and purge these motherfuckin plists
sudo rm -f /System/Library/Extensions/IOPlatformPluginFamily.kext/Contents/PlugIns/ACPI_SMC_PlatformPlugin.kext/Contents/Resources/*.plist
# Reboot to recovery mode and enable system integrity protection
csrutil enable
# Reboot