Skip to content

Instantly share code, notes, and snippets.

View jamaljeantobias's full-sized avatar

Jamal Jean - Tobias jamaljeantobias

  • Sanctuary
  • Toronto
View GitHub Profile
@good-idea
good-idea / gist:46d01e3d657aa3de4cc004be61bd73c5
Created October 5, 2021 16:20
swell-sanity-homepage-query-explain
.
└── Evaluate expr: ([0])
│ legacyArraySemantics: true
└── Map expr: ({
│ ...,
│ \"body\": body[].<LegacyScope expr={
│ ...,
│ \"asset\": asset._ref.<LegacySingleKeyJoin source=___refJoin_2 keyExpr=_id>.<LegacyScope expr={
│ \"_id\": _id,
│ \"extension\": extension,
const sanityClient = require('@sanity/client');
const crypto = require('crypto');
const {
SANITY_API_TOKEN,
SANITY_PROJECT_ID,
SANITY_DATASET,
SHOPIFY_SECRET
} = process.env;

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

Make sure XCode tools are installed

@rinchik
rinchik / SeleniumScreenCapture.py
Created June 4, 2016 17:04
Capturing screenshots with Python and Selenium
from selenium import webdriver
import os
class ScreenCapture:
STAGING_URL = 'http://www.yahoo.com'
PRODUCTION_URL = 'http://www.yahoo.com'
driver = None
def __init__(self):
@monicao
monicao / react.md
Last active February 23, 2021 19:07
React Lifecycle Cheatsheet

React Component Lifecycle

  • getInitialState
  • getDefaultProps
  • componentWillMount
  • componentDidMount
  • shouldComponentUpdate (Update only)
  • componentWillUpdate (Update only)
  • componentWillReceiveProps (Update only)
  • render
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing