Yet another framework syndrome
Name | Date | URL | Stars |
---|---|---|---|
Jake | April 2010 | https://github.com/mde/jake | 1000 |
Brunch | January 2011 | http://brunch.io/ | 3882 |
class ResqueStaleWorkerCleaner | |
SLOWEST_JOB = (ENV["SLOWEST_JOB"] || 30).to_i # minutes | |
def call | |
Resque.workers.each do |worker| | |
worker.unregister_worker if old_worker?(worker) | |
end | |
end | |
private |
class Api::BaseController < ActionController::Base | |
protect_from_forgery with: :null_session | |
before_action :unauthorized_if_signed_out | |
layout false | |
def current_user | |
@current_user ||= ( | |
authenticate_or_request_with_http_token do |token, options| | |
User.find_by(api_key: token) | |
end |
Yet another framework syndrome
Name | Date | URL | Stars |
---|---|---|---|
Jake | April 2010 | https://github.com/mde/jake | 1000 |
Brunch | January 2011 | http://brunch.io/ | 3882 |
# Create a 10 megabytes, blank, AES 256 Encrypted, with password "mypassword", | |
# MacOS Journaled (Extended) image named "MyImage" when attached, | |
# and myimage.dmg as filename in the current directory. | |
# | |
echo -n "mypassword" | hdiutil create \ | |
-encryption AES-256 \ | |
-stdinpass \ | |
-size 10m \ | |
-fs "Journaled HFS+" \ | |
-volname MyImage \ |
Incoming Server Settings: | |
Incoming Server Name: imap.zoho.com | |
Port: 993 | |
Require SSL: Yes | |
Outgoing Server Settings: | |
Outgoing Server Name: smtp.zoho.com | |
Port: 465 | |
Require SSL: Yes | |
Require Authentication: Yes |
Gigabyte Z77-DS3H Motherboard MultiBeast Configuration.
/* Initialisation / Button events */ | |
// If added to home screen... | |
if(navigator.standalone === undefined || !!navigator.standalone) { | |
// On Android scroll the screen by 1 pixel to hide the address bar | |
if (navigator.userAgent.match(/Android/i)) { | |
window.addEventListener("load", function() { window.scrollTo(0,1); }, false); | |
} | |
// Show the converter & hide the install option by default |
require 'faye' | |
Faye::WebSocket.load_adapter('thin') | |
use Faye::RackAdapter, :mount => '/faye', :timeout => 25 | |
require ::File.expand_path('../config/environment', __FILE__) | |
run App::Application |
Child of Light (RPG) | |
Bound by Flame (Action/RPG) | |
LORDS OF THE FALLEN (Action/RPG) | |
Dying Light (Action) | |
Kingdom Hearts III (Action/RPG) | |
Deep Down (Action/RPG) | |
Project Phoenix (RPG) | |
Kingdom Come: Deliverance (RPG) | |
Tom Clancy's The Division (Online Shooter/RPG) | |
The Witcher 3: Wild Hunt (Action/RPG) |
# Create happily takes IO-like objects as body. | |
file = directory.files.create( | |
:key => 'giant_linux_distro.iso', | |
:body => File.open("nightly.iso"), # No ma! No read()! | |
:public => true | |
) | |
# Get will take a block for streamy goodness. | |
directory.files.get("giant_thing.bin") do |chunk, remaining, total| | |
output.write(chunk) |