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
#!/bin/sh | |
cd $PWD | |
echo $1 | |
if [ -d .git ]; then | |
if [ -z "$1" ]; then | |
echo "checking out $(git symbolic-ref --short -q HEAD) ..." |
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
# Add UbuntuGIS-unstable repository and update packages: | |
sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable | |
sudo apt update | |
# Install PostGIS: | |
sudo apt install postgis postgresql-9.6-postgis-2.3 | |
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
# frozen_string_literal: true | |
class DynamoDBConfig | |
include Singleton | |
attr_reader :client, :configs | |
def initialize | |
@configs ||= { | |
access_key_id: Rails.application.secrets.aws_access_key_id, |
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
--- | |
layout: page | |
title: Presentations | |
--- | |
<div class="posts"> | |
{% for presentation in site.presentations %} | |
<li> | |
<a href="{{ site.baseurl }}{{ presentation.url }}"> | |
{{ post.title }} | |
</a> |
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
<head> | |
<link href="http://gmpg.org/xfn/11" rel="profile"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<!-- Enable responsiveness on mobile devices--> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> | |
<title> |
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
<!DOCTYPE html> | |
<html lang="en-us"> | |
{% include presentations-head.html %} | |
<body> | |
<div class="reveal"> | |
<div class="slides"> | |
{{ content }} | |
</div> | |
</div> |
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
# frozen_string_literal: true | |
class AWSConfigs | |
include Singleton | |
attr_reader :ddb_client, :sqs_client, :iot_client, :configs, :ddb_configs | |
def initialize | |
@configs ||= { | |
access_key_id: Rails.application.secrets.aws_access_key_id, |
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
# Place your local configuration in /etc/mosquitto/conf.d/ | |
# | |
# A full description of the configuration file is at | |
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example | |
pid_file /var/run/mosquitto.pid | |
persistence true | |
persistence_location /var/lib/mosquitto/ |
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 User < ApplicationRecord | |
# rails 4 way of defining virtual attribute | |
attr_accessor :full_name | |
# new rails 5 way of defining virtual attributes with datatype and default values | |
attribute :name, :string, default: -> { "No Name" } | |
attribute :age, :float, default: 99 | |
before_save :assign_name | |
before_save :assign_full_name |
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 Song | |
include ActiveModel::Model, ActiveModel::Serialization | |
attr_accessor :name | |
attr_accessor :movie_ids | |
attr_accessor :created_at | |
attr_accessor :updated_at | |
def self.migrate_table | |
migration = Aws::Record::TableMigration.new(self) |