Skip to content

Instantly share code, notes, and snippets.

View naartjie's full-sized avatar

Marcin Jekot naartjie

View GitHub Profile
@naartjie
naartjie / walkAsync.js
Last active September 3, 2015 08:35 — forked from RReverser/gist:0a0263ec5abc5db03e05
async await
async function walk (dir, visitor) {
const filenames = await fs.readdirAsync(dir)
await* filenames
.map(filename => path.join(dir, filename))
.map(async filename => {
const stat = await fs.statAsync(filename)
if (stat.isDirectory()) {
await walk(filename, visitor)
} else {
@roberto-robles
roberto-robles / detect_browser.cljs
Last active March 3, 2016 07:27
Redirect to store in Clojurescript with setTimeout
(cond
(>= (.indexOf (.-userAgent js/navigator) "Android") 0)
(do
(js/setTimeout (.open js/window "market://details?id=com.myproject") 1500)
"Android")
(.test (js/RegExp. "(iPad|iPhone|iPod)" "g") (.-userAgent js/navigator))
(do
(js/setTimeout (.open js/window "https://itunes.apple.com/us/app/myApp/00001?mt=8") 1500)
"iOS"))
@naartjie
naartjie / .jshintrc
Last active August 29, 2015 14:16 — forked from kentcdodds/.jshintrc
{
"curly": true,
"eqeqeq": true,
"bitwise": true,
"camelcase": true,
"expr": true,
"esnext": true,
"forin": true,
"freeze": true,
"immed": true,
@kentcdodds
kentcdodds / .jshintrc
Created March 11, 2015 23:16
.jshint config for my work project
{
"curly": true,
"eqeqeq": true,
"bitwise": true,
"camelcase": true,
"expr": true,
"esnext": true,
"forin": true,
"freeze": true,
"immed": true,
@bhauman
bhauman / core.cljs
Last active August 16, 2022 12:08
Helpful patterns when developing with ClojureScript Figwheel and Express js
(ns todo-server.core
(:require
[cljs.nodejs :as nodejs]
[figwheel.client :as fw]))
(nodejs/enable-util-print!)
(defonce express (nodejs/require "express"))
(defonce serve-static (nodejs/require "serve-static"))
(defonce http (nodejs/require "http"))
@bhauman
bhauman / README.md
Last active December 3, 2019 16:43
ClojureScript minimal dev and prod setup.

Recent improvements to the ClojureScript compiler have greatly simplified setting up development versus production outputs.

This example uses Figwheel as something that you want to exclude for production, but the pattern is general.

With this simple setup you only need one html file/view and it will work for developement and production.

@aviflax
aviflax / 1 - Resources for Learning Stream Data Processing.md
Last active August 17, 2025 20:43
Resources for Learning Stream Data Processing

Introduction

This gist started with a collection of resources I was maintaining on stream data processing — also known as distributed logs, data pipelines, event sourcing, CQRS, and other names.

Over time the set of resources grew quite large and I received some interest in a more guided, opinionated path for learning about stream data processing. So I added the reading list.

Please send me feedback!

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active December 20, 2025 07:03
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@mmitchel
mmitchel / gist:8500019
Created January 19, 2014 03:09
Disable xterm on XQuartz Startup
defaults write org.macosforge.xquartz.X11 app_to_run /usr/bin/true
@markgoodyear
markgoodyear / 01-gulpfile.js
Last active May 5, 2023 03:21
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* gulp
* $ npm install gulp-ruby-sass gulp-autoprefixer gulp-cssnano gulp-jshint gulp-concat gulp-uglify gulp-imagemin gulp-notify gulp-rename gulp-livereload gulp-cache del --save-dev
*/
// Load plugins
var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefixer = require('gulp-autoprefixer'),
cssnano = require('gulp-cssnano'),