Skip to content

Instantly share code, notes, and snippets.

View Evomatic's full-sized avatar
Refuelling

Evan Trujillo Evomatic

Refuelling
View GitHub Profile
@Evomatic
Evomatic / dogs.json
Last active May 7, 2021 08:37
dogs.json
[
{ "name": "Samson", "breed": "doberman", "likes": "playing" },
{ "name": "Hank", "breed": "corgi", "likes": "sleeping" },
{ "name": "Sophie", "breed": "shitzu", "likes": "eating" }
]
@Evomatic
Evomatic / index.js
Last active May 7, 2021 10:38
fetch
fetch('https://jsonplaceholder.typicode.com/users')
.then(response => response.json())
.then(results => console.log(results))
@Evomatic
Evomatic / async_function.js
Last active May 9, 2021 11:19
async function
async function getUsers() {
const response = await fetch('https://jsonplaceholder.typicode.com/users');
let results = await response.json();
console.log(results);
}
@Evomatic
Evomatic / POST_user.js
Last active May 9, 2021 11:19
add a user!
//Adding this user object
let user = {
name: "sonGoku",
username: "SSJ",
email: "sonGoku@capsulecorp.com"
};
async function getUsers() {
const response = await fetch('https://jsonplaceholder.typicode.com/users', {
@Evomatic
Evomatic / PATCH.js
Last active May 9, 2021 11:18
patch method
async function getUsers() {
const response = await fetch('https://jsonplaceholder.typicode.com/users/11', {
method: 'PATCH',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: "super saiyan"
})
});
@Evomatic
Evomatic / DELETE.js
Last active May 9, 2021 11:18
delete
async function getUsers() {
const response = await fetch('https://jsonplaceholder.typicode.com/users/11', {
method: 'DELETE'
});
let results = await response.json();
console.log(results);
};
@Evomatic
Evomatic / .gitconfig
Created August 2, 2022 23:08 — forked from natescode/.gitconfig
Git Aliases to make GIT easier to work with
[user]
email = your_email
name = your_username
[alias]
# git clone
cl = !git clone
# Git shallow clone for large repos
clq= !git clone --depth=1
s = status
co = checkout

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Evomatic
Evomatic / list-of-curl-options.txt
Created July 4, 2023 02:05 — forked from eneko/list-of-curl-options.txt
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password