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
/* eslint-disable no-undef */ | |
import { useEffect, useState, useRef } from 'react'; | |
const useAutocomplete = () => { | |
// By using the `set` method of the `useState` hook, we can coax this into being `callback ref` | |
// contained inside of the hook. | |
const [autocompleteRef, setAutocompleteRef] = useState(null); | |
// We will return the formatted address with this const. | |
const [autocompletedAddress, setAutocompletedAddress] = useState(null); | |
// We only want one instance of the google places autocomplete method called using our callback |
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
# brew install go | |
# go get github.com/arsham/figurine | |
# golang | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin | |
# bash greeting | |
figurine coverhound |
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
// | |
// ViewController.swift | |
// Trailer | |
// | |
// Created by Cody Lopez on 1/18/18. | |
// Copyright © 2018 Cody Lopez. All rights reserved. | |
// | |
import UIKit | |
import Mapbox |
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
{ | |
"workbench.colorTheme": "One Dark Pro", | |
"files.autoSave": "onFocusChange", | |
"editor.fontSize": 14, | |
"editor.fontFamily": "Fira Code", | |
"editor.tabSize": 2, | |
"editor.fontLigatures": false, | |
"editor.renderWhitespace": "all", | |
"files.insertFinalNewline": true, | |
"search.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
<app-map [center]="center" [shops]="shops"></app-map> | |
<app-map-list [shops]="shops"></app-map-list> |
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
# Usage: | |
# djgen <project_name> <app_name> | |
# Parameters: | |
# $1 <project_name> | |
# $2 <app_name> | |
djgen() { | |
echo "👟 [Running] django-admin startproject $1" | |
django-admin startproject $1 |
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
# Use this setup block to configure all options available in SimpleForm. | |
SimpleForm.setup do |config| | |
config.error_notification_class = 'alert alert-danger' | |
config.button_class = 'btn btn-primary' | |
config.boolean_label_class = nil | |
config.wrappers :vertical_input_group, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b| | |
b.use :html5 | |
b.use :placeholder | |
b.use :label, class: 'form-control-label' |
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/services/add_file_to_printnode_queue.rb | |
require 'printnode' | |
class AddFileToPrintnodeQueue | |
def self.call(file_url, title, printer_name, file_type='pdf_uri') | |
# Connect to the API and setup a Client object. | |
auth = PrintNode::Auth.new(ENV['printnode_api_key']) | |
client = PrintNode::Client.new(auth) |
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
module Permissions | |
class AdminPermission < BasePermission | |
def initialize(user) | |
allow_all | |
end | |
end | |
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
module CurrentCheckout | |
extend ActiveSupport::Concern | |
included do | |
before_action :set_current_checkout | |
end | |
private | |
def set_current_checkout |
NewerOlder