Skip to content

Instantly share code, notes, and snippets.

View miguelplazasr's full-sized avatar

Miguel Plazas miguelplazasr

  • Pulsar IT
  • Miami, FL
View GitHub Profile
const apiUrl = "http://api.quotable.io/random?tags=";
async function start() {
var quote;
var cite;
const response = await fetch(apiUrl);
const data = await response.json();
if (response.ok) {
// Update DOM elements
@miguelplazasr
miguelplazasr / folder_links.js
Created February 2, 2023 17:55 — forked from ngraham20/folder_links.js
Obsidian Templater Script to Generate Folder Links
@miguelplazasr
miguelplazasr / 1-setup.md
Created October 5, 2021 12:37 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@miguelplazasr
miguelplazasr / http_status_codes.php
Created August 19, 2016 15:42 — forked from nietzscheson/http_status_codes.php
HTTP status codes array
<?php
$code = array();
$code['0'] = 'Connection Failed. Please configure Varnish to accept HTTP purge requests.';
$code['100'] = 'Continue';
$code['101'] = 'Switching Protocols';
$code['102'] = 'Processing';
$code['200'] = 'OK';
$code['201'] = 'Created';
$code['202'] = 'Accepted';
@miguelplazasr
miguelplazasr / README.md
Created July 13, 2016 21:56 — forked from tjamps/README.md
Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

Basic RESTful API with Symfony 2 + FOSRestBundle (JSON format only) + FOSUserBundle + FOSOauthServerBundle

The API we are creating in this gist will follow these rules :

  • The API only returns JSON responses
  • All API routes require authentication
  • Authentication is handled via OAuth2 with password Grant Type only (no need for Authorization pages and such).
  • API versioning is managed via a subdomain (e.g. v1.api.example.com)

The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :