Skip to content

Instantly share code, notes, and snippets.

View rilian's full-sized avatar

rilian rilian

View GitHub Profile
@rilian
rilian / slack_delete.rb
Created September 29, 2016 12:52 — forked from jamescmartinez/slack_delete.rb
This Ruby script will bulk remove all Slack files older than 30 days. Just add your API token from https://api.slack.com/web#authentication into the token quotes at the top of the file.
require 'net/http'
require 'json'
require 'uri'
@token = ''
def list_files
ts_to = (Time.now - 30 * 24 * 60 * 60).to_i # 30 days ago
params = {
token: @token,
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
Name Price Integrations Limits Language
bugsnag.com $29 per month slack, jira 5 devs javascript, php
speedcurve.com $0.01 per check slack, jira - javascript
honeybadger.io $44 per month slack, jira 5 projects javascript
atatus.com $29 per month slack, jira 200000 view/month javascript
muscula.com $14 per month - 1 000 000 errors/month javascript
exceptional.io - - - -
airbrake.io $39 per month slack, jira 5 projects, 10 users javascript, php
errorception.com $29 per month slack, jira

Flux and Flux-like Options

A non-exhaustive list of flux and flux-like libraries with relevant information and notes.

Library Stars Latest Release
Facebook flux
reflux
fluxxor
marty [](https:/
CREATE FUNCTION batch_at_will() RETURNS INTEGER LANGUAGE plpgsql AS $$
DECLARE batched_count INTEGER = 1;
BEGIN
WITH selected_users AS (
SELECT id
FROM users
WHERE role = 'moderator'
AND registration_date < CURRENT_DATE - INTERVAL '4' YEAR
LIMIT 1000
FOR UPDATE NOWAIT
@rilian
rilian / xvfb
Created January 28, 2014 19:39 — forked from jterrace/xvfb
export DISPLAY=localhost:1.0
XVFB=/usr/bin/Xvfb
XVFBARGS=":1 -screen 0 1024x768x24 -ac +extension GLX +render -noreset"
PIDFILE=/var/run/xvfb.pid
case "$1" in
start)
echo -n "Starting virtual X frame buffer: Xvfb"
start-stop-daemon --start --quiet --pidfile $PIDFILE --make-pidfile --background --exec $XVFB -- $XVFBARGS
echo "."
;;

Commandline output

$ ruby treetoar.rb 
SELECT "topics".* FROM "topics"  WHERE "topics"."id" = 1
Topic.where(id: 1)
SELECT "topics".* FROM "topics"  WHERE "topics"."id" IN (1, 2, 3)
Topic.where(id: [1, 2, 3])