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 sf from "@util/simple_fetch"; | |
type Indexed = { | |
[key in string]: unknown; | |
}; | |
export interface PasswordData extends Indexed { | |
oldPassword?: string; | |
newPassword?: 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
import mapboxgl from "mapbox-gl"; // ES6 import | |
import "mapbox-gl/dist/mapbox-gl.css"; // Import module's CSS | |
import MapboxDirections from "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions"; | |
import "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions.css"; | |
const fitMapToMarkers = (map, markers) => { | |
const bounds = new mapboxgl.LngLatBounds(); | |
markers.forEach((marker) => bounds.extend([marker.lng, marker.lat])); | |
map.fitBounds(bounds, { padding: 70, maxZoom: 15, duration: 0 }); | |
}; |
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 mapboxgl from "mapbox-gl"; // ES6 import | |
import "mapbox-gl/dist/mapbox-gl.css"; // Import module's CSS | |
import MapboxDirections from "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions"; | |
import "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions.css"; | |
const fitMapToMarkers = (map, markers) => { | |
const bounds = new mapboxgl.LngLatBounds(); | |
markers.forEach((marker) => bounds.extend([marker.lng, marker.lat])); | |
map.fitBounds(bounds, { padding: 70, maxZoom: 15, duration: 0 }); | |
}; |
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 mapboxgl from "mapbox-gl"; // ES6 import | |
import "mapbox-gl/dist/mapbox-gl.css"; // Import module's CSS | |
import MapboxDirections from "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions"; | |
import "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions.css"; | |
const fitMapToMarkers = (map, markers) => { | |
const bounds = new mapboxgl.LngLatBounds(); | |
markers.forEach((marker) => bounds.extend([marker.lng, marker.lat])); | |
map.fitBounds(bounds, { padding: 70, maxZoom: 15, duration: 0 }); | |
}; |
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 mapboxgl from "mapbox-gl"; // ES6 import | |
import "mapbox-gl/dist/mapbox-gl.css"; // Import module's CSS | |
import MapboxDirections from "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions"; | |
import "@mapbox/mapbox-gl-directions/dist/mapbox-gl-directions.css"; | |
const fitMapToMarkers = (map, markers) => { | |
const bounds = new mapboxgl.LngLatBounds(); | |
markers.forEach((marker) => bounds.extend([marker.lng, marker.lat])); | |
map.fitBounds(bounds, { padding: 70, maxZoom: 15, duration: 0 }); | |
}; |
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
require 'sinatra' | |
post '/*' do | |
puts JSON.pretty_generate(request.env) | |
puts request.body.read | |
end | |
put '/*' do | |
puts JSON.pretty_generate(request.env) | |
puts request.body.read |
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
class CreateRestaurants < ActiveRecord::Migration[6.1] | |
def change | |
create_table :restaurants do |t| | |
t.string :name | |
t.integer :rating, null: false, default: 0 | |
t.string :address | |
t.timestamps | |
end | |
end |
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
type NotObject<T> = T extends object ? never : T; | |
type IndexedFlat<T> = { | |
[key in string]: NotObject<T>; | |
}; | |
type IndexedNested = { | |
[key in string]: object; | |
}; |
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
############################################ | |
### Base image ### | |
############################################ | |
# Image which will be used for all environments: production, testing & development | |
ARG RUBY_VERSION=2.7.2 | |
FROM ruby:$RUBY_VERSION-slim-buster as base | |
ARG PG_MAJOR=12 | |
ARG DEBIAN_FRONTEND=noninteractive | |
COPY .seatrain/Aptfile /tmp/Aptfile |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'pry' # gem install pry (for debugging) | |
# gem 'httplog' | |
# - cast: | |
# - "Tim Robbins" | |
# - "Morgan Freeman" | |
# - "Bob Gunton" | |
# # Only the first 3 first actress/actors |
NewerOlder