A non-exhaustive list of flux and flux-like libraries with relevant information and notes.
Library | Stars | Latest Release |
---|---|---|
Facebook flux | ||
reflux | ||
fluxxor | ||
marty | [ |
A non-exhaustive list of flux and flux-like libraries with relevant information and notes.
Library | Stars | Latest Release |
---|---|---|
Facebook flux | ||
reflux | ||
fluxxor | ||
marty | [ |
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 |
$ free -m
total used free shared buffers cached
Mem: 490 482 7 13 3 55
-/+ buffers/cache: 423 66
Swap: 0 0 0
$ sudo dd if=/dev/zero of=/swapfile bs=32M count=16
16+0 records in
16+0 records out
# | |
# In git project folder run | |
# git log > log.txt | |
# | |
# then | |
# ruby git_work_by_day.rb | |
# | |
# Sample result: | |
# | |
# Fri Feb 20 => Mike Smith, Bob Jones |
# https://gist.github.com/rilian/e89d9dbc096f56ebcb1d | |
# | |
# Custom rspec matcher for testing CanCan abilities. | |
# Originally inspired by https://github.com/ryanb/cancan/wiki/Testing-Abilities | |
# | |
# Usage: | |
# expect.to have_abilities(:create).on(Post.new) | |
# expect.to have_abilities([:read, :update].on(post) | |
# expect.to have_abilities({manage: false, destroy: true}.on(post) | |
# expect.to have_abilities({create: false}.on(Post.new) |
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 "." | |
;; |
ABILITY = { | |
simple_user => { | |
can => %w[name], | |
cannot => %w[type], | |
} | |
} |