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
| <VirtualHost *:80> | |
| ServerName jobeet2.lcl | |
| DocumentRoot /var/www/jobeet2/web | |
| <Directory /var/www/jobeet2/web> | |
| Options -Indexes -MultiViews +FollowSymLinks | |
| AllowOverride None | |
| Order allow, deny | |
| Allow from all |
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
| import play.api.libs.json.{JsValue => PJsValue, JsString => PJsString, _} | |
| import spray.json | |
| import spray.json.{DeserializationException, JsString, JsValue, JsonFormat} | |
| /** | |
| * Enum alternative with Json marshallers for free (Play and Spray) | |
| * | |
| * credit: https://gist.github.com/atamborrino/1d992ebb942cd5518ca2 | |
| * | |
| * Use: |
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
| import logging | |
| import sys | |
| logger = logging.getLogger() | |
| logger.setLevel(logging.DEBUG) | |
| ch = logging.StreamHandler(sys.stdout) | |
| ch.setLevel(logging.DEBUG) | |
| formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
| ch.setFormatter(formatter) |
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
| (ns alchemyapi.iab) | |
| (def iab-categories | |
| {"IAB1" "Arts_Entertainment" | |
| "IAB1-1" "Arts_Entertainment/Books & Literature" | |
| "IAB1-2" "Arts_Entertainment/Celebrity Fan/Gossip" | |
| "IAB1-3" "Arts_Entertainment/Fine Art" | |
| "IAB1-4" "Arts_Entertainment/Humor" | |
| "IAB1-5" "Arts_Entertainment/Movies" | |
| "IAB1-6" "Arts_Entertainment/Music" |
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
| const express = require('express'); | |
| const cors = require('cors'); | |
| const bodyParser = require('body-parser'); | |
| const { | |
| connect, syncDb, buildAndRegisterModel, setupAssociations, mapException, mapQueryParams | |
| } = require('serve-sequelize'); | |
| const app = express(); | |
| const sequelize = connect({ |
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
| (ns playground | |
| (:refer-clojure :exclude [==]) | |
| (:use clojure.core.logic) | |
| (:require [java-time :as jt] | |
| [clojure.core.logic.fd :as fd])) | |
| ;; INITIAL DATA | |
| (def nb-parcells 4) | |
| (def days-to-plan 10) | |
| (def crop-growth-days 3) |
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
| function unserialize(serialized) { | |
| serialized = serialized.split("") | |
| const res = [] | |
| const parseNumber = () => { | |
| next = serialized.shift() | |
| let digits = "" | |
| while (!isNaN(parseInt(next))) { | |
| digits += next | |
| next = serialized.shift() |
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
| (ns dev.pathom-playground | |
| (:require [com.wsscode.pathom3.connect.indexes :as pci] | |
| [com.wsscode.pathom3.connect.operation :as pco] | |
| [com.wsscode.pathom3.interface.eql :as p.eql])) | |
| ;; that one works fine | |
| (pco/defresolver timezone-resolver [item] | |
| {::pco/input [:timezone/id] | |
| ::pco/output [:timezone/label]} | |
| {:timezone/label (str "label for id " (:timezone/id item))}) |
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
| (ns aoc.day12 | |
| (:require [clojure.java.io :as io] | |
| [clojure.string :as str])) | |
| (defn parse-input [file-name] | |
| (reduce (fn [graph [a b]] | |
| (-> graph | |
| (update a conj b) | |
| (update b conj a))) | |
| {} |
OlderNewer