Skip to content

Instantly share code, notes, and snippets.

Avatar

Craig P Jolicoeur cpjolicoeur

View GitHub Profile
@cpjolicoeur
cpjolicoeur / cors.janet
Created Jun 17, 2020
CORS middleware for Joy framework
View cors.janet
(defn cors [handler &opt opts]
(default opts @{})
(def defaults @{"Access-Control-Allow-Origin" "*"
"Access-Control-Allow-Methods" "GET, OPTIONS"
"Access-Control-Allow-Headers" "Content-Type"
"Access-Control-Max-Age 86400})
(def options (merge defaults opts))
(fn [request]
(if (= "OPTIONS" (get request :method))
@{:status 204, :body "" :headers options}
View unit_availability_controller_test.exs
defmodule DaydreamWeb.API.UnitAvailabilityControllerTest do
use DaydreamWeb.ConnCase
alias Daydream.{Fixtures, HomeShare, Repo}
alias Daydream.HomeShare.{UnitAvailability}
alias Daydream.Accounts.{Tenant}
import Ecto.Query, only: [from: 2]
@today Date.utc_today()
View unit_availability_controller_test.exs
defmodule DaydreamWeb.API.UnitAvailabilityControllerTest do
use DaydreamWeb.ConnCase
alias Daydream.{Fixtures, HomeShare, Repo}
alias Daydream.HomeShare.{UnitAvailability}
alias Daydream.Accounts.{Tenant}
import Ecto.Query, only: [from: 2]
@today Date.utc_today()
View raw_stats.json
[
{
"Name": "Aaron Gordon",
"Slug": "gordoaa01",
"Pos": "PF",
"Age": 23,
"G": 78,
"MP": 2633,
"PER": 15.1,
"TS%": 0.54,
@cpjolicoeur
cpjolicoeur / upgrade.md
Created Mar 6, 2017 — forked from chrismccord/upgrade.md
Phoenix 1.2.x to 1.3.0 Upgrade Instructions
View upgrade.md

If you want a run-down of the 1.3 changes and the design decisions behidn those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

View _landing_testimonials.haml
.testimonials
.container
.row
%h2
Say goodbye to spreadsheets and bloated scheduling software.
%span.enjoy-easy
Enjoy easy - like
%span.these-guys these guys.
%span.like-nick Nick.
.row
View strings.js
'use strict';
import LocalizedStrings from 'react-native-localization';
export const AppStrings = new LocalizedStrings({
en: {
appName: 'MediBajo English'
},
es: {
appName: 'MediBajo'
View *magit-diff: MediBajo.txt
2 files changed, 15 insertions(+), 7 deletions(-)
Components/.#SplashScreen.js | 1 -
components/price_list.js | 21 +++++++++++++++------
deleted Components/.#SplashScreen.js
@@ -1 +0,0 @@
-cpjolicoeur@Mandalore.70799
\ No newline at end of file
modified components/price_list.js
@@ -1,6 +1,7 @@
@cpjolicoeur
cpjolicoeur / ADB Error.log
Created Jul 29, 2015
Location manager on dead thread error
View ADB Error.log
07-29 09:52:08.043 18671-325/com.accuweather.watchface W/MessageQueue﹕ Handler (android.location.LocationManager$ListenerTransport$1) {4268d760} sending message to a Handler on a dead thread
java.lang.RuntimeException: Handler (android.location.LocationManager$ListenerTransport$1) {4268d760} sending message to a Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:320)
at android.os.Handler.enqueueMessage(Handler.java:626)
at android.os.Handler.sendMessageAtTime(Handler.java:595)
at android.os.Handler.sendMessageDelayed(Handler.java:566)
at android.os.Handler.sendMessage(Handler.java:503)
at android.location.LocationManager$ListenerTransport.onLocationChanged(LocationManager.java:242)
at android.location.ILocationListener$Stub.onTransact(ILocationListener.java:58)
at android.os.Binder.execTransact(Binder.java:404)