Skip to content

Instantly share code, notes, and snippets.

(ns interop.core
(:require [cljs.nodejs :as nodejs]))
(nodejs/enable-util-print!)
(def Immutable (js/require "immutable"))
(extend-type Immutable.List
ISeqable
(-seq [coll]
{
"title": "Adapt",
"version": "3.1.4",
"build": true,
"guide": {
"buttons": {
"core": "core button text",
"components": "component button text"
},
"items": [
@vitillo
vitillo / tutorial.scala
Last active December 18, 2020 17:33
Spark Tutorial @ Mozlandia 2014
//==========================================================================
// A gentle tutorial to Spark and Telemetry
//==========================================================================
// Let's import some Spark classes
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
// ... and some json parsing utilities
@potch
potch / style.js
Last active August 29, 2015 14:12
2015 JavaScript Style Guide
// Bad
"Your Framework Sucks."
// Bad
"Browserify? Have you heard about WebPack?"
// Bad
"Ember vs Angular: 10 Things You Should Know"
@ericelliott
ericelliott / essential-javascript-links.md
Last active May 17, 2024 03:38
Essential JavaScript Links
@city41
city41 / gist:aab464ae6c112acecfe1
Last active January 19, 2021 12:51
ClojureScript secretary client side navigation without hashes

This is the example that comes with the reagent template converted to use HTML5 based history. This means there are no # in the urls.

I just got this working, so there might be better approaches

The changes are

  • use goog.history.Html5history instead of goog.History
  • listen to clicks on the page, extract the path from them, and push them onto the history
  • listen to history changes, and have secretary do its thing in response
var ringFunction = function( geometry, radius, segments ) {
var rStep = 2 * Math.PI / segments;
return {
create : function( height, skinIndex, skinWeight ) {
for( var i=0; i < segments; i++ ) {
@pmclanahan
pmclanahan / bedrock-changes.md
Created February 2, 2015 22:39
Bedrock Changes

We're making some changes to how static media (js, css, images, fonts, etc.) is handled in bedrock. The major points are as follows:

Instead of the old media('img/dude.gif'), you'll now use static('img/dude.gif'). It's nearly identical, but you do have to be more careful NOT to include a slash at the beginning of the path. The old way would deal, the new will break.

Replacing the old jingo-minify css('bundle-name') and js('bundle-name') functions are tags. They're functionally identical to the old ones, but look like: {% javascript 'bundle-name' %} and {% stylesheet 'bundle-name' %}.

Speaking of bundles, there is a new syntax for them. We're moving from...

OLD

@ianblenke
ianblenke / upgrade-coreos.md
Last active July 7, 2021 03:49
How to upgrade CoreOS manually

Before upgrading, make sure you are allowing insecure registry access, or your newer docker won't be able to talk to the Deis registry:

sudo bash -c 'mkdir -p /etc/systemd/system/docker.service.d/; cat <<EOF > /etc/systemd/system/docker.service.d/50-insecure-registry.conf
[Service]
Environment="DOCKER_OPTS=--insecure-registry 10.0.0.0/8 --insecure-registry 172.16.0.0/12 --insecure-registry 192.168.0.0/16"
EOF
'