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
{ | |
"env": { | |
"node": true, | |
"es2020": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended" | |
], | |
"parser": "@typescript-eslint/parser", |
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
# Replace "octocat" with you, or the user you're creeping. | |
export GIST_GITHUB_USERNAME="octocat"; | |
export GIST_GITHUB_PAGE="1"; | |
curl https://api.github.com/users/$GIST_GITHUB_USERNAME/repos\?sort\=created\&direction\=desc\&page\=$GIST_GITHUB_PAGE | jq '.[].html_url' | |
# Other properties of relevance: | |
# html_url description license.url | |
# Given username = tinacious | |
# curl https://api.github.com/users/tinacious/repos | jq .[].full_name |
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
code --install-extension aeschli.vscode-css-formatter | |
code --install-extension annsk.alignment | |
code --install-extension bierner.markdown-preview-github-styles | |
code --install-extension christian-kohler.npm-intellisense | |
code --install-extension christian-kohler.path-intellisense | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension EditorConfig.EditorConfig | |
code --install-extension eg2.vscode-npm-script | |
code --install-extension fcrespo82.markdown-table-formatter | |
code --install-extension HookyQR.beautify |
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
# Homebrew | |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
brew cask | |
brew install wget | |
# Node.js development | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash | |
echo "nvm: Go here and add to your bash profile: https://github.com/nvm-sh/nvm"; |
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 { PermissionsAndroid } from 'react-native'; | |
import DeviceInfo from 'react-native-device-info'; | |
/** | |
* Depending on the version of Android, we need to check different permissions | |
* to enable this functionality. | |
* Android Q and above only require read permission. | |
* Older versions require both read and write. | |
* | |
* Also make sure you have the following permissions in your manifest. |
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
AllCops: | |
NewCops: enable | |
Exclude: | |
- 'db/**/*' | |
- 'vendor/**/*' | |
Layout/LineLength: | |
Max: 150 | |
IgnoredPatterns: ['\#'] | |
Exclude: |
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/local/bin/ruby | |
require 'json' | |
docs = File.read('spec/api_doc/v1/schemas/docs.json') | |
docs_json = JSON.parse(docs) | |
docs_json['info']['x-logo'] = { | |
"url": "https://example.com/logo.png", | |
"backgroundColor": "#ff3399" | |
} |
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
// Create a playground called NetworkingPlayground, e.g. | |
// ./NetworkingPlayground.playground/Contents.swift | |
import UIKit | |
/* | |
{ | |
"id": 1, | |
"title": "Vinyl gloves", | |
"merchant": "Shoppers Drug Mart", |
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
# ./app/controllers/health_controller.rb | |
class HealthController < ApplicationController | |
skip_before_action :authenticate! | |
def index | |
current_time_str = ActiveRecord::Base.connection.execute("SELECT CURRENT_TIME;").first["current_time"] | |
current_time = current_time_str.to_datetime | |
render json: { |
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
gitcleanup() { | |
echo 'Paste git branches to be deleted below then press enter...\n' | |
while read line | |
do | |
if [ -n "$line" ]; then | |
echo "\n" | |
git branch -D $line | |
echo "\n" | |
fi | |
done < "${1:-/dev/stdin}" |