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
defmodule OneDrive | |
require Logger | |
@graph_api_url "https://graph.microsoft.com/v1.0/" | |
# The parent_drive_item is a Graph API driveItem object representing the root folder the file it to be uploaded to. | |
# There are many other representations left as an exercise to the reader | |
# | |
# The remote_file_path variable has the complete path to the file on the OneDrive side, e.g. /foo/bar/baz.txt | |
# If either the /foo or /bar folders are not already there, they will be created. They do not have to be created |
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
FROM elixir:latest | |
# Install debian packages | |
RUN apt-get update && \ | |
apt-get install --yes build-essential inotify-tools postgresql-client git && \ | |
apt-get clean | |
ADD . /app | |
# Install Phoenix packages |
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
class HealthController < ApplicationController | |
def index | |
ActiveRecord::Base.connection.execute('select 1') | |
head :ok | |
rescue | |
head :bad_request | |
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
files: | |
"/etc/nginx/conf.d/000_APP_NAME.conf": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
upstream APP_NAME_app { | |
server unix:///var/run/puma/my_app.sock; | |
} |
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 CoreExtensions | |
module Array | |
module Enhancements | |
# a = [0, 1, 2, 3, 4] | |
# a.splice(2, 1, *[9, 8, 7]) | |
# => [1, 2, 9, 8, 7, 4] | |
def splice(start, len, *replace) | |
self[start, len] = replace | |
self | |
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
mysql> create table bar ( c1 int not null ); | |
Query OK, 0 rows affected (0.00 sec) | |
mysql> select table_name, engine from information_schema.tables where table_schema = 'spyder_development' and table_name = 'bar'; | |
+------------+--------+ | |
| table_name | engine | | |
+------------+--------+ | |
| bar | InnoDB | | |
+------------+--------+ | |
1 row in set (0.00 sec) |
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
require 'spec_helper_lite' | |
require 'sonian/use_cases/create_root_partner' | |
require 'sonian/use_cases/create_account' | |
require 'sonian/use_cases/create_user' | |
require 'sonian/persistence/memory_store' | |
module Sonian | |
describe CreateUser do | |
let(:gateway) { MemoryStore.new } |
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
require 'sonian/use_cases/password_encryption' | |
require 'sonian/values/user' | |
require 'active_support/core_ext/object/blank' | |
module Sonian | |
class CreateUser | |
def initialize(account_vo, data_store) | |
raise ArgumentError.new unless account_vo && data_store | |
@account = account_vo | |
@user_gateway = data_store.user_gateway |
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
sudo rmmod r8192se_pci | |
sleep 2 | |
# sudo modprobe r8192se_pci hwwep=0 | |
sudo modprobe r8192se_pci |
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
Account in the trial period should not be found in queries after the trial period expires (Not Yet Implemented) | |
./spec/models/account_spec.rb:1643 | |
1) | |
'Account in general should have password expiration range 180 days by default' FAILED | |
expected: 180, | |
got: 0 (using ==) | |
./spec/models/account_spec.rb:59: | |
2) |
NewerOlder