Skip to content

Instantly share code, notes, and snippets.

View leontalbot's full-sized avatar

Léon Talbot leontalbot

  • Stylitics
  • Quebec City
View GitHub Profile
@adam-james-v
adam-james-v / literate-clojure-emacs-config.org
Created April 4, 2021 04:45
A minimum-viable emacs config. for literate programming with Clojure.

Emacs Config

;;

This is a ‘minimum viable config’ built for the purpose of literate programming with Clojure / Clojurescript. It uses MELPA to download and install a few packages that I consider necessary for a good Clojure dev. experience, though that’s of course only my opinion. I use CIDER, a robust and popular REPL tool. It could arguably be substituted for inf-clojure, but I haven’t tried that myself.

This config does assume that you already have emacs installed and that you have at least a cursory understanding of how to navigate and use it. Or, at the very least know a few keywords to search as you try learn things. Emacs can be a daunting tool (I don’t even know most of it myself yet, honestly), but you can do the most critical things without too much difficulty and a bit of patience.

@gmp26
gmp26 / antd.cljs
Created October 21, 2018 09:58
reduced version of cljsjs.antd for use with shadow-cljs
(ns cljsjs.antd
(:require [goog.object :as gobj]
["antd/es/affix" :default ant-affix]
["antd/es/button" :default ant-button]
["antd/es/col" :default ant-col]
["antd/es/icon" :default ant-icon]
["antd/es/layout" :default ant-layout]
["antd/es/locale-provider/en_GB" :default ant-locale-provider]
["antd/es/row" :default ant-row]
["moment" :as moment]
@pbostrom
pbostrom / cljs-npm.md
Last active March 8, 2024 07:53
Loading third-party npm modules in ClojureScript

Loading third-party npm modules in ClojureScript

This example shows how to load the re-resizable npm module which provides a resizable React component. Requires the lein-npm plugin.

  1. Add the npm module to the :npm :dependencies section of project.clj:
 :npm {:package {:scripts {:build "webpack -p"}}
       :dependencies [[react "16.4.0"]
                      [react-dom "16.4.0"]
                      ["@cljs-oss/module-deps" "1.1.1"]
@heron2014
heron2014 / react-native-maps-enable-google-maps-instructions.md
Last active April 11, 2024 09:39
Visual instructions how to enable Google Maps on IOS using react-native-maps

Visual instructions how to enable Google Maps on IOS using react-native-maps

UPDATE: Following instructions are now a year old. I have recently managed to upgrade react-native-maps from 0.17 to the latest version 0.21 with react-native 0.51 - if you want to follow my instruction scroll down to the end this doc! Hope that will work for you too!

This is for my personal use, things might not be correctly explained here. For the official docs please check https://github.com/airbnb/react-native-maps

Steps from scratch:

1.react-native init GoogleMapPlayground

@paultopia
paultopia / safe-merge.clj
Last active September 4, 2023 22:16
merge for clojure that doesn't overwrite existing values with nil values
(require '[clojure.core.match :refer [match]])
(defn discard-nils [a b]
(match [a b]
[_ nil] a
:else b))
(def safe-merge (partial merge-with discard-nils))
;; examples
(ns ui.form
(:refer-hoplon :exclude [select input textarea label form])
(:require [ui.form.input :as input]
[ui.button :as button]
[ui.modal :as modal]
[ui.grid :as grid]
[ui.filters :as filters]
[ui.link :as link]
[ui.util :as util]
[ui.icon :as icon]
(ns app.ui.login
(:require [goog.net.cookies :as cks]
[app.rpc :as rpc]
[ui.form :as form]
[ui.button :as button]
[workflow.form :as workflow]
[ui.modal :as modal]
[ui.app :as app]))
(def schema
@terjesb
terjesb / core.clj
Created October 1, 2013 19:20
Google Analytics Core Reporting API v3 using Service Account from Clojure
(ns ga-exp.core
(:import
(com.google.api.client.googleapis.auth.oauth2 GoogleCredential$Builder)
(com.google.api.client.googleapis.javanet GoogleNetHttpTransport)
(com.google.api.client.json.jackson2 JacksonFactory)
(com.google.api.services.analytics Analytics$Builder AnalyticsScopes)))
(def HTTP_TRANSPORT (GoogleNetHttpTransport/newTrustedTransport))
(def JSON_FACTORY (JacksonFactory.))
@stuartsierra
stuartsierra / spellcheck.clj
Created July 9, 2013 01:47
Example implementation of Norvig's Spellchecker in Clojure, using core.async
;; Example implementation of Norvig's Spellchecker in Clojure,
;; using core.async
;;
;; There are probably some bugs in this.
;;
;; Original problem: https://github.com/ericnormand/spelling-jam
;; from Lambda Jam, Chicago, 2013: http://lambdajam.com/
;;
;; Clojure core.async introduction:
;; http://clojure.com/blog/2013/06/28/clojure-core-async-channels.html
@mrrooijen
mrrooijen / README.md
Created August 15, 2012 01:30
Heroku SSL Endpoint, RapidSSL

Heroku SSL Endpoint

Assumptions:

  • You want to enable SSL for your domain.
  • You want to go with RapidSSL.
  • Your domain name is www.domain.com during this example.
  • You want to encrypt requests for a single domain (no wildcard)
  • You want to apply this certificate to Heroku's SSL Endpoint