Skip to content

Instantly share code, notes, and snippets.

@geosava
geosava / README.md
Created November 16, 2016 13:56 — forked from mblackstock/README.md
FRED Node-RED hosted chat application with sentiment analysis

This flow uses http nodes and web sockets nodes to serve up a simple web page with a chat application that colours messages depending on whether they are positive or negative according to the sentiment node.

Copy the flow, and import it from the clipboard using Node-RED on FRED.

Change the URL ws://fred.sensetecnic.com/public/guides/receive and ws://fred.sensetecnic.com/public/guides/publish, replacing guides with your FRED user name.

Change the same URL to get it working on a 'stock' Node-RED install, or check it out on the Node-RED flows library - flows.nodered.org.

@geosava
geosava / nodered.conf
Created November 30, 2016 14:38 — forked from natcl/nodered.conf
Node-red startup file for Synology (/etc/init)
# only start this service after the httpd user process has started
#start on syno.network.ready
start on runlevel 2
# stop the service gracefully if the runlevel changes to 'reboot'
stop on runlevel [06]
# run the scripts as the 'admin' user. Running as root (the default) is a bad idea.
setuid admin
@geosava
geosava / oreilly.py
Created August 7, 2017 09:36 — forked from nhumrich/oreilly.py
get free o'reilly books
"""Script to download free O'Reilly ebooks."""
import asyncio
import os
import re
import sys
import aiohttp
filename_matcher = re.compile(r'http://www.oreilly.com/(.*)/free/(.*).csp')
session = None
@geosava
geosava / slack_history.py
Created October 27, 2017 11:37 — forked from Chandler/slack_history.py
Download Slack Channel/PrivateChannel/DirectMessage History
# MIT License
# Copyright (c) 2016 Chandler Abraham
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@geosava
geosava / introrx.md
Created May 25, 2018 10:55 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@geosava
geosava / tjug.jsh
Created May 31, 2018 07:26 — forked from mcupak/tjug.jsh
Exploring Java 9 APIs with JShell at TJUG - session notes.
HashSet<String> set = new HashSet<String>()
set.add("a")
set.add("b")
set.add("c")
Collections.unmodifiableSet(set)
1+1
int x = 1+1
System.out.println(x)
Thread.sleep(2000)
/vars