Skip to content

Instantly share code, notes, and snippets.

View thedgbrt's full-sized avatar
🏠
Working from home

Dagobert Renouf thedgbrt

🏠
Working from home
View GitHub Profile
@damianrr
damianrr / amplify-function-graphql-cognito.js
Last active March 6, 2020 22:42
How to query/mutate AppSync's GraphQL from within Amplify's lambda functions by login into Cognito user pool and reusing Authorization token.
const R = require('ramda');
const aws = require("aws-sdk");
const { GraphQLClient } = require("graphql-request");
aws.config.update({
region: process.env.REGION
});
const cognitoidentityserviceprovider = new aws.CognitoIdentityServiceProvider({
apiVersion: "2016-04-18"
});
@JoeyEremondi
JoeyEremondi / elm-tco-internal.md
Last active December 8, 2016 22:43
Elm Tail Calls: Development Document

Elm TCO

The Transformation

For an example, let's look at the oneOf function from the Maybe module:

oneOf : List (Maybe a) -> Maybe a
oneOf maybes =
  case maybes of
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@joelclermont
joelclermont / gist:3735026
Created September 17, 2012 00:56
using yepnope for twitter js and css with local fallback
function cssLoaded(href) {
var cssFound = false;
for (var i = 0; i < document.styleSheets.length; i++) {
sheet = document.styleSheets[i];
if (sheet['href'].indexOf(href) >= 0 && sheet['cssRules'].length > 0) {
cssFound = true;
}
};
@tylergaw
tylergaw / dabblet.css
Created April 18, 2012 22:23
Centered Vertical line with CSS Gradient
/**
* Centered Vertical line with CSS Gradient
*/
div {
background: #fff;
background: linear-gradient(180deg, transparent, #353535, transparent);
background-position: 50%;
background-repeat: repeat-y;
background-size: 1px auto;
}
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@prestarocket
prestarocket / prestashop gitignore
Created July 8, 2011 00:43
Prestashop gitignore
# This is a template .gitignore file for git-managed Prestashop projects. Inspired by micahwalter wordpress gitignore
#Ignore ds_store
*.DS_Store
# Ignore everything in the root except modules, themes and override.
/*
!modules/
!themes/
@redoPop
redoPop / .gitignore
Created June 18, 2010 22:08
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your