Skip to content

Instantly share code, notes, and snippets.


Francesco Sardo frankiesardo

View GitHub Profile
View deps.edn
{org.clojure/clojure {:mvn/version "1.9.0"}
com.datomic/datomic-free {:mvn/version "0.9.5697"}}}
bhb /
Last active May 3, 2021
Clojure friendly mode, inspired by
athos / deps.edn
Last active Nov 4, 2021
Try `clojure -Sdeps '{:deps {hello-clojure {:git/url "" :sha "1c9a05106171f97f9b8e8ac8f58c7bd8dbe021f9"}}}' -m hello-clojure` on your terminal
View deps.edn
{:paths ["."]
:deps {clansi {:mvn/version "1.0.0"}}}
pesterhazy / react_cljs_es6_classes.cljs
Last active Nov 7, 2021
ClojureScript: bare React with ES6 classes (extending React.Component, no createClass or reagent)
View react_cljs_es6_classes.cljs
(ns demo.react-cljs-es6-classes
(:require [goog.object :as gobj]))
;; Demo of using bare React using ES6 classes (without createClass or reagent)
;; Equivalent of Javascript/JSX:
;; class MyComponent extends React.Component {
;; constructor(props) {
;; super(props);
thheller / es6-class.cljs
Created Aug 24, 2017
class extends React.Component in CLJS
View es6-class.cljs
(defn my-component [props context updater]
(cljs.core/this-as this
(js/ this props context updater)
;; anything else you want to set-up. use goog.object/set on this
(.. my-component -prototype)
jgilfelt /
Last active Jan 28, 2017
ScalpelDrawer - A simple wrapper for Scalpel ( that includes toggle controls accessible from a right-side navigation drawer. Call ScalpelDrawer.wrapInside() in a base Activity onPostCreate() to easily wrap all content in your app.
package com.example.scalpeldrawer;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
swankjesse /
Created Jun 29, 2013
Demonstrate HTTP caching with OkHttp and Retrofit.
* Copyright (C) 2013 Square, Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
View annotation-processor-build.gradle
configurations {
dependencies {
compile 'com.squareup.dagger:dagger:1.1.0'
apt 'com.squareup.dagger:dagger-compiler:1.1.0'
android.applicationVariants.all { variant ->
cyrilmottier /
Created Nov 21, 2012
"Open source licenses" screen
import android.os.Bundle;
public class LicensesActivity extends BaseActivity {
private WebView mWebView;
View image.clj
;; depends on [org.imgscalr/imgscalr-lib "4.2"]
(ns XXX.image
(:refer-clojure :exclude [read])
(:require [ :as io])
(:import [org.imgscalr Scalr Scalr$Method Scalr$Mode]
[java.awt Image]
[java.awt.image RenderedImage BufferedImageOp]
[javax.imageio ImageIO ImageWriter ImageWriteParam IIOImage]