This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf
# Using a Private Action | |
You can run a private action in a separate repository using a separate checkout step with a PAT and running it as a local action. | |
An action like: | |
```yaml | |
- name: My Action | |
uses: joshmgross/private-action@v1 | |
with: | |
input1: value1 | |
``` |
NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good
This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.
My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.
Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0
# using such a setup requires `apt-get install lua-nginx-redis` under Ubuntu Trusty | |
# more info @ http://wiki.nginx.org/HttpLuaModule#access_by_lua | |
http { | |
lua_package_path "/etc/nginx/include.d/?.lua;;"; | |
lua_socket_pool_size 100; | |
lua_socket_connect_timeout 10ms; | |
lua_socket_read_timeout 10ms; | |
server { |
#A script to post back to Slack via the webhooks API
##why this exists?
Slack's own hubot adapter needs the hubot installation to be accessible via web. This can be problematic in some cases, as a security risk.
This hack let's you run your Hubot behind a firewall, and connect to Slack via the IRC gateway.
To respond, Hubot uses the incoming webhooks end-point of Slack.
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
Wolfram = require('wolfram-alpha').createClient(process.env.HUBOT_WOLFRAM_APPID) | |
module.exports = (robot) -> | |
robot.catchAll (msg) -> | |
r = new RegExp "^(?:#{robot.alias}|#{robot.name}) (.*)", "i" | |
matches = msg.message.text.match(r) | |
if matches != null && matches.length > 1 | |
Wolfram.query matches[1], (e, result) -> | |
if result and result.length > 0 | |
msg.send result[1]['subpods'][0]['text'] |
module.exports = (robot) -> | |
robot.router.post "/hubot/say", (req, res) -> | |
room = req.body.room | |
message = req.body.message | |
robot.logger.info "Message '#{message}' received for room #{room}" | |
user = robot.userForId 'broadcast' | |
user.room = room | |
user.type = 'groupchat' | |
robot.send user, "#{message}" | |
res.writeHead 200, {'Content-Type': 'text/plain'} |
# Inspired by http://tomb.io/posts/hubot-ci-and-deploying/ | |
# Its probably tightly bound to the xmpp adapter, and incorrect | |
# in loads of ways, but its a start. | |
# POST a json document to /message containing 'room' (the JID of the room | |
# you want to talk to) and 'message' (the message you want to send) | |
http = require "http" | |
Robot = require '../src/robot' |