Skip to content

Instantly share code, notes, and snippets.

View ScalaWilliam's full-sized avatar
🏠
Working from home

ScalaWilliam ScalaWilliam

🏠
Working from home
View GitHub Profile
@wsargent
wsargent / win10-dev.md
Last active August 7, 2024 18:20
Windows Development Environment for Scala

Windows 10 Development Environment for Scala

This is a guide for Scala and Java development on Windows, using Windows Subsystem for Linux, although a bunch of it is applicable to a VirtualBox / Vagrant / Docker subsystem environment. This is not complete, but is intended to be as step by step as possible.

Harden Windows 10

Read the entire Decent Security guide, and follow the instructions, especially:

@androidfred
androidfred / haskell_stack_and_intellij_idea_ide_setup_tutorial_how_to_get_started.md
Last active November 25, 2024 17:49
Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Haskell, Stack and Intellij IDEA IDE setup tutorial how to get started

Upon completion you will have a sane, productive Haskell environment adhering to best practices.

Basics

  • Haskell is a programming language.
  • Stack is tool for Haskell projects. (similar tools for other languages include Maven, Gradle, npm, RubyGems etc)
  • Intellij IDEA IDE is a popular IDE.

Install required libraries

sudo apt-get install libtinfo-dev libghc-zlib-dev libghc-zlib-bindings-dev

@fancellu
fancellu / Mustache.scala
Last active December 30, 2016 21:03
Running JS from JDK1.8 (mustache.js example and raw example with binding)
package nashorn
import javax.script.{Invocable, ScriptEngineManager, SimpleBindings}
import java.io.InputStreamReader
import scala.collection.JavaConverters._
object Mustache {
private val engineManager = new ScriptEngineManager()
val engine = engineManager.getEngineByName("nashorn")
val invocable = engine.asInstanceOf[Invocable]
@DracoBlue
DracoBlue / Twitter To Twtxt.md
Last active March 28, 2024 12:44
Poor mans twitter to twtxt converter
#!/usr/bin/env node
var EventSource = require('eventsource');
var cfgPath = require('confortable')('stream.json', process.cwd());
if (!cfgPath) {
throw new Error("Could not load stream.json");
}
var cfg = require(cfgPath);
var ircStream = require('irc-stream')(cfg.irc.server, cfg.irc.name, {
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.milkbox.net/packages/") t)
(defun ensure-package-installed (&rest packages)
"Assure every package is installed, ask for installation if it’s not.
Return a list of installed packages or nil for every skipped package."
(mapcar
@fancellu
fancellu / Influx1.scala
Last active June 10, 2017 02:02
Tiny bit of code emitting to InfluxDB Time Series Database in Scala
package influxdb
import org.influxdb._
import org.influxdb.dto._
import java.util.concurrent.TimeUnit
object Influx1 extends App {
val influxDB = InfluxDBFactory.connect("http://localhost:8086", "root", "root");
println(influxDB.describeDatabases())

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@threepointone
threepointone / ionode.diff
Created January 20, 2015 20:55
io.js compatibility
diff --git a/src/clj/cljs/repl/node_repl.js b/src/clj/cljs/repl/node_repl.js
index 6bc1cd2..46e7f7e 100644
--- a/src/clj/cljs/repl/node_repl.js
+++ b/src/clj/cljs/repl/node_repl.js
@@ -1,6 +1,7 @@
process.env.NODE_DISABLE_COLORS = true;
-var net = require("net");
+var net = require("net"),
+ vm = require('vm');
@ScalaWilliam
ScalaWilliam / README.md
Last active August 29, 2015 14:12
Installing Attic on CentOS 7 / RHEL 7 (also installing Python 3 on CentOS 7 / RHEL 7)