This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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 * as React from "react" | |
import { View, StyleSheet, Animated } from "react-native" | |
const styles = StyleSheet.create({ | |
imageOverlay: { | |
position: "absolute", | |
left: 0, | |
right: 0, | |
bottom: 0, | |
top: 0, |
This file contains hidden or 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
# node/react-native typescript require conflict: | |
# https://gist.github.com/rawrmaan/be47e71bd0df3f7493ead6cefd6b400c | |
#!/usr/bin/env bash | |
ed -s ./node_modules/@types/react-native/index.d.ts <<< $',s/declare global/declare namespace FuckGlobals/g\nw' |
This file contains hidden or 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
$ heroku pg:backups:capture | |
$ heroku pg:backups:download | |
Then: | |
$ pg_restore -c -d torq_api_development latest.dump |
This file contains hidden or 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
openssl pkcs12 -in apns-dev-cert.p12 -out apns-dev-cert.pem -nodes -clcerts |
This file contains hidden or 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
if ARGV[0].to_i == 0 || ARGV[0].to_i == nil | |
puts "usage: ruby random.rb [random string length (integer)]" | |
return -1 | |
end | |
o = [('a'..'z'), ('A'..'Z'), (1...9), ('!'..'/')].map(&:to_a).flatten | |
string = (0...ARGV[0].to_i).map { o[rand(o.length)] }.join | |
puts "random: #{string}" |