Skip to content

Instantly share code, notes, and snippets.

View pgarciacamou's full-sized avatar
:octocat:

Pablo Garcia pgarciacamou

:octocat:
View GitHub Profile
@jbritton
jbritton / graphql-cheat-sheet.md
Last active November 30, 2025 02:05
GraphQL Cheat Sheet

GraphQL Cheat Sheet

Overview

  • An alternative approach to RESTful APIs
  • Clients issue queries/mutations to read and update data
  • Clients can fetch only the entity fields that are required
  • GraphQL query syntax can express complex entity relations => nested objects
  • Mitigates the explosion of RESTful endpoints in scenarios where many different representations of an entity are needed
  • Graphiql is a query execution UI, also provides good documentation
@petertwise
petertwise / Gruntfile.js
Created May 9, 2018 00:03
My Grunt Setup - no ruby required version
// inspired by https://gist.github.com/jshawl/6225945
// Thanks @jshawl!
// now using grunt-sass to avoid Ruby dependency
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: { // sass tasks
dist: {
@softwarespot
softwarespot / window.onerror.js
Created May 27, 2018 17:53
Listen for uncaught errors using window.addEventListener('error', ...)
<script>
window.addEventListener('error', (event) => {
const { message, filename, lineno, colno, error } = event;
console.log('Captured uncaught error:', message, filename, lineno, colno, error.stack);
});
setTimeout(() => {
try {
throw new Error('An unexpected error occurred (2)');
} catch (ex) {
@bryant988
bryant988 / zillow.js
Last active July 14, 2026 22:23
Zillow Image Downloader
/**
* NOTE: this specifically works if the house is for sale since it renders differently.
* This will download the highest resolution available per image.
*/
/**
* STEP 1: Make sure to *SCROLL* through all images so they appear on DOM.
* No need to click any images.