Skip to content

Instantly share code, notes, and snippets.

View kexoth's full-sized avatar

Aleksandar Kex Trpeski kexoth

View GitHub Profile
mutation {
create_psych_consultation(
input: {
is_draft: false
patient_id: 233623
date: "2018-07-17"
recommended_diagnoses: [{diagnosis_id: 11860}]
recommended_medications: [{
medication_id: 11861
date: "2018-07-17"
@kexoth
kexoth / cloudSettings
Created June 23, 2018 16:09
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-06-23T16:09:03.264Z","extensionVersion":"v2.9.2"}
@kexoth
kexoth / History|-1172153b|entries.json
Last active July 27, 2022 20:21
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/aleksandar.trpeski/Documents/tax-service/tests/app/transactions/adapters/avalara/create_transaction/test_fulfillment_discount.py","entries":[{"id":"dyTS.py","source":"searchReplace.source","timestamp":1654103958553},{"id":"ViJr.py","source":"searchReplace.source","timestamp":1654104020802},{"id":"aRWL.py","timestamp":1656335032686},{"id":"MvKE.py","timestamp":1656335239330}]}
@kexoth
kexoth / Console.elm
Created August 14, 2017 00:38
Elmo-8 Console reimplementation with better wrapping, WIP
module Elmo8.Console exposing (Command, putPixel, print, boot, Config, sprite)
{-| The ELMO-8 Fantasy Console
This is a PICO-8 inspired fantasy "console". This isn't really a console emulator but a simple graphics and game library for creating 8-bit retro games.
# Initialization
To start up the console you need to do a little bit of configuration (the pattern matches Elm's normal model/view/update):
@kexoth
kexoth / WrappedProgram.elm
Last active April 16, 2018 14:41
This is a wrapped Elm `Html.program` in order to add additional logic around it.
module Main exposing (..)
import Html exposing (Html, text)
type Msg msg
= Internal
| Wrapped msg
@kexoth
kexoth / form.html.eex
Created April 21, 2016 17:15
Ecto Arc S3 Image Uploader Not Working
<%= form_for @changeset, @action, [multipart: true], fn f -> %>
<%= if @changeset.action do %>
<div class="alert alert-danger">
<p>Oops, something went wrong! Please check the errors below.</p>
</div>
<% end %>
<div class="form-group">
<%= label f, :title, class: "control-label" %>
<%= text_input f, :title, class: "form-control" %>
@kexoth
kexoth / delay
Created October 21, 2015 19:25
Swift Delay Block
func delay(delay: Double, closure: ()->()) {
dispatch_after(
dispatch_time(
DISPATCH_TIME_NOW,
Int64(delay * Double(NSEC_PER_SEC))
),
dispatch_get_main_queue(),
closure
)
}
function solution(A, B, K) {
return (Math.floor(B/K) - ((A <= 1) ? 0 : Math.floor((A-1)/K))) + ((A === 0)?1:0);
}
function solution(A) {
var cars0 = 0,
cars1 = 0,
combinations = 0;
for (var i = A.length - 1; i >= 0; i--) {
if (A[i] === 0) {
function solution(N, A) {
var counters = new Uint32Array(N),
max = 0,
gMax = 0;
for (i = 0; i < A.length; i++) {
var value = A[i];