Skip to content

Instantly share code, notes, and snippets.

View pbangelly's full-sized avatar

Angelly pbangelly

View GitHub Profile
@DavidColby
DavidColby / slider.html
Created May 6, 2021 22:12
Implementation of a horizontal slider component with Stimulus and Tailwind CSS
<!--
This code is meant to accompany the guide originally published at https://colby.so/posts/building-a-horizontal-slider-with-stimulus-and-tailwind
It intentionally pulls in Tailwind CSS and Stimulus without a build system to simplify the guide. You shouldn't do this with a real application,
you should use a build system like webpack!
-->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
@jssteinberg
jssteinberg / GTM.svelte
Last active September 8, 2023 14:51
How to Implement Google Tag Manager in Svelte, in Functional Programming
<script>
import { onMount } from 'svelte';
/** @type {string} gtmId - GTM ID 'GTM-F00BARS'. */
export let gtmId = '';
/** @type {(Object[]|Object)} [gtmDataPoints=[]] - Array or single object of custom data points for dataLayer.
* @type {Object} [gtmDataPoints[]] - Custom data point Object.
* @type {string} [gtmDataPoints[][]] - Custom data point property. */
export let gtmDataPoints = [];
/** @type {number} [timeout] - The number of milliseconds to timeout intiating loading the GTM script from Google */
@brandonkal
brandonkal / markdown-reference.md
Last active April 10, 2021 18:36
Markdown Styling Reference for Gatsby

NOTE: This "post" is based on Markdown Cheatsheet and is meant to test styling of Gatsby Sites.

This is intended as a quick reference and showcase. For more complete info, see John Gruber's original spec and the Github-flavored Markdown info page.

This cheatsheet is specifically Markdown Here's [^1] version of Github-flavored Markdown. This differs slightly in styling and syntax from what Github uses, so what you see below might vary a little from what you get in a Markdown Here email, but it should be pretty close [^2]. This paragraph has two footnotes for testing.

You can play around with Markdown on our live demo page.

(If you're not a Markdown Here user, check out the Markdown Cheatsheet that is not specific to MDH. But, really, you should also use Markdown H

0474200716fc833e5ad3b33ae7ad34d65df0c1b00f941729a8955c713cf3e10e5ae5b4c4aa3f5305532a3d0f9dbcc85c83fe6b39fa38c7341c00e34a19b527eadc
{
"presets": [
["env", {
"targets": {
"node": "current"
}
}]
],
"plugins": [
["module-resolver", {
{
"env": {
"node": true,
"es6": true
},
"extends": "standard",
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,

lodash

In this assignment, we want you to re-implement some of the most popular methods found in [lodash][lodash]. This task will provide you two incredible learning opportunities: first, you'll have the opportunity to apply your knowledge of JavaScript; second, you'll learn through this experience that lodash, similar to all JavaScript libraries, are written with the same JavaScript you've been learning!

If you're unfamiliar with lodash, it's [a popular utility library][popular-utility-library] written in JavaScript. Inside of it, you'll find a collection of methods, such as [forEach()][for-each], which replaces the boilerplate code that developers often find themselves writing--e.g., code that iterates on every item of a collection.

Here's an example:

// Without lodash, you have to create your own implementation of forEach.
function forEach(arr, callback) {
@patpohler
patpohler / Big List of Real Estate APIs.md
Last active October 24, 2025 13:50
Evolving list of Real Estate APIs by Category

Big List of Real Estate APIs

Listings / Property Data

####Rets Rabbit http://www.retsrabbit.com

Rets Rabbit removes the nightmare of importing thousands of real estate listings and photos from RETS or ListHub and gives you an easy to use import and Web API server so you can focus on building your listing search powered website or app.

import React from 'react'
import { connect } from 'react-redux'
import { subscribeToBeta } from 'reducer/subscriptions/beta'
// for connect
const mapStateToProps = (state) => {
return {
working: state.subscribe.working,
complete: state.subscribe.complete,
@patrickleet
patrickleet / gitflow.sh
Created October 18, 2015 00:43
Average git workflow
# create a branch (ex. 'bug/checkout-error '
# or 'feature/segment-analytics')
git checkout -b feature/example
# Do work, then commit your changes.
# To create a commit you first need to add the files
# you are going to commit. This is known
# as "staging the files".
# Check that the files changes are what you think.