Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
Rails flash messages with AJAX requests & twitter-bootstrap 2.3
Forked from https://gist.github.com/linjunpop/3410235 Based on Stackoverflow answer: http://stackoverflow.com/a/10167659/656428
License: MIT
class Scheduler < Rufus::Scheduler::PlainScheduler | |
def initialize(zk, *args) | |
super(*args) | |
@zk_locker = zk.exclusive_locker('scheduler') | |
end | |
def run | |
@zk_locker.with_lock do | |
configure |
(I guarantee nothing. No warranty I am not responsible blah blah blah. Seems to work great for me so far. Thanks to Tyler Bird who I forked this from.)
This installs a patched ruby 1.9.3-p448 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
This installs a patched ruby 1.9.3-p484 with the railsexpress patchsets: https://github.com/skaes/rvm-patchsets
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
#!/bin/bash | |
# From http://tech.serbinn.net/2010/shell-script-to-create-ramdisk-on-mac-os-x/ | |
# | |
ARGS=2 | |
E_BADARGS=99 | |
if [ $# -ne $ARGS ] # correct number of arguments to the script; | |
then |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
var scripts = document.getElementsByTagName('script'); | |
var myScript = scripts[scripts.length - 1]; | |
var queryString = myScript.src.replace(/^[^?]+??/, ''); | |
var params = parseQuery(queryString); | |
function parseQuery(_0x28bex6) { | |
var _0x28bex7 = new Object(); | |
if (!_0x28bex6) { | |
return _0x28bex7; | |
}; |
# First you update your system | |
sudo apt update && sudo apt-get dist-upgrade | |
# Clean-up System | |
sudo apt purge epiphany-browser epiphany-browser-data #browser | |
sudo apt purge midori-granite #browser | |
# sudo apt-get purge noise # music player | |
sudo apt autoremove | |
sudo apt autoclean |
#!/bin/bash | |
export LC_ALL=C | |
now=$(date +"%Y%m%d-%H%M%S") | |
parent_dir="/data/bitwarden" | |
backups_dir="${parent_dir}/backups" | |
log_file="${backups_dir}/backup-progress.log.${now}" | |
tmp_sqlite_backup="backups/db.sqlite3.${now}" | |
archive="backups/backup.tar.gz.${now}" |
#!/bin/bash | |
export LC_ALL=C | |
version=$(snap list | grep wekan | awk -F ' ' '{print $3}') | |
now=$(date +"%Y%m%d-%H%M%S") | |
parent_dir="/data/backups/wekan" | |
backup_dir="${parent_dir}/${now}" | |
log_file="${parent_dir}/backup-progress.log.${now}" | |
error () { |