This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const injectedJavascript = [ | |
"setTimeout(function() {", | |
" const metaTag = document.createElement('meta');", | |
" metaTag.setAttribute('name', 'viewport');", | |
" metaTag.setAttribute('content', 'width=device-width, initial-scale=1');", | |
" document.getElementsByTagName('head')[0].appendChild(metaTag);", | |
" setTimeout(function() {", | |
" const documentSize = { displayedMessageContentHeight: document.body.scrollHeight };", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useRef } from "react" | |
const useRefsWithKeys = <T>(): { | |
setRefForKey: (key: string) => (element: T) => void | |
getRefForKey: (key: string) => T | |
} => { | |
const ref = useRef<Record<string, T>>({}) | |
const setRefForKey = | |
(key: string) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main exposing (main) | |
import Browser | |
import Html exposing (..) | |
type alias Model = | |
{} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lolcode exposing (main) | |
import Browser | |
import Html exposing (..) | |
type alias Model = | |
{} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
path=/Applications/Automator.app | |
defaults write com.apple.dock persistent-apps -array-add "<dict><key>tile-data</key><dict><key>file-data</key><dict><key>_CFURLString</key><string>$path</string><key>_CFURLStringType</key><integer>0</integer></dict></dict></dict>"; killall Dock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* toggle-macos-accessibility-keyboard | |
* javascript for automation (jxa) | |
* | |
* description: | |
* macOS automation script to toggle the macOS Accessibility Keyboard. | |
* Shows and hides the keyboard depending on its current state. | |
* | |
* author: sidneys | |
* homepage: http://sidneys.github.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plaid_client_double = instance_double(Plaid::Client) | |
plaid_transactions_double = instance_double(Plaid::Transactions) | |
ENV["PLAID_ENVIRONMENT"] = "plaid_environment" | |
ENV["PLAID_CLIENT_ID"] = "plaid_client_id" | |
ENV["PLAID_SECRET"] = "plaid_secret" | |
ENV["PLAID_CLIENT_NAME"] = "plaid_client_name" | |
allow(Plaid::Client).to receive(:new).with( | |
env: "plaid_environment", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "fileutils" | |
def component_template(component_name) | |
<<~COMPONENT_TEMPLATE | |
import React from "react" | |
import { View } from "react-native" | |
import styles from "./styles" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react" | |
import Grid from "@material-ui/core/Grid" | |
import Typography from "@material-ui/core/Typography" | |
import Link from "@material-ui/core/Link" | |
const things = [ | |
{ | |
name: "A Knight's Tale", | |
type: "Movie", | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "returns true when passed an even number" do | |
even = even?(2) | |
expect(even).to be(true) | |
end |