Skip to content

Instantly share code, notes, and snippets.

@idleberg
idleberg / vscode-macos-context-menu.md
Last active April 25, 2024 07:14
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@bradwestfall
bradwestfall / S3-Static-Sites.md
Last active April 10, 2024 16:40
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

⚠ This post is fairly old. I don't keep it up to date. Be sure to see comments where some people have posted updates

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation
@andigu
andigu / TabParallax.js
Last active October 23, 2023 07:34
A react native component featuring parallax scrolling with tabs
import React, {Component} from "react";
import {Animated, Dimensions, Platform, Text, TouchableOpacity, View} from "react-native";
import {Body, Header, List, ListItem as Item, ScrollableTab, Tab, TabHeading, Tabs, Title} from "native-base";
import LinearGradient from "react-native-linear-gradient";
const {width: SCREEN_WIDTH} = Dimensions.get("window");
const IMAGE_HEIGHT = 250;
const HEADER_HEIGHT = Platform.OS === "ios" ? 64 : 50;
const SCROLL_HEIGHT = IMAGE_HEIGHT - HEADER_HEIGHT;
const THEME_COLOR = "rgba(85,186,255, 1)";
@obahareth
obahareth / README.md
Created June 11, 2017 10:29
GitHub GraphQL API Starred Repositories With Pagination

GitHub GraphQL API Starred Repositories Examples With Pagination

You can play with the GraphQL API live here. It's pretty nice and has autocompletion based on the GraphQL schema.

The first example gets your first 3 starred repos, the cursor values can be used for pagination.

Here's an example response from the first query:

{
cfhdojbkjhnklbpkdaibdccddilifddb Adblock Plus 10000000
gighmmpiobklfepjocnamgkkbiglidom AdBlock 10000000
efaidnbmnnnibpcajpcglclefindmkaj Adobe Acrobat 10000000
gomekmidlodglbbmalcneegieacbdmki Avast Online Security 10000000
eofcbnmajmjmplflapaojjnihcjkigck Avast SafePrice 10000000
chfdnecihphmhljaaejmgoiahnihplgn AVG Web TuneUp 10000000
flliilndjeohchalpbbcdekjklbdgfkk Avira Browser Safety 10000000
gpdjojdkbbmdfjfahjcgigfpmkopogic Pin It Button 10000000
lifbcibllhkdhoafpjfnlhfpfgnpldfl Skype 10000000
mallpejgeafdahhflmliiahjdpgbegpk FromDocToPDF 9298905
# Autogenerated input type of AddComment
input AddCommentInput {
# A unique identifier for the client performing the mutation.
clientMutationId: String
# The Node ID of the subject to modify.
subjectId: ID!
# The contents of the comment.
body: String!
@mxstbr
mxstbr / Readme.md
Last active December 20, 2023 12:01
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
cfhdojbkjhnklbpkdaibdccddilifddb Adblock Plus 10000000
gighmmpiobklfepjocnamgkkbiglidom AdBlock 10000000
efaidnbmnnnibpcajpcglclefindmkaj Adobe Acrobat 10000000
gomekmidlodglbbmalcneegieacbdmki Avast Online Security 10000000
eofcbnmajmjmplflapaojjnihcjkigck Avast SafePrice 10000000
chfdnecihphmhljaaejmgoiahnihplgn AVG Web TuneUp 10000000
flliilndjeohchalpbbcdekjklbdgfkk Avira Browser Safety 10000000
gpdjojdkbbmdfjfahjcgigfpmkopogic Pin It Button 10000000
lifbcibllhkdhoafpjfnlhfpfgnpldfl Skype 10000000
mallpejgeafdahhflmliiahjdpgbegpk FromDocToPDF 9298905
@btroncone
btroncone / rxjs_operators_by_example.md
Last active July 16, 2023 14:57
RxJS 5 Operators By Example
@btroncone
btroncone / ngrxintro.md
Last active February 9, 2024 15:37
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents