NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
#! /bin/sh | |
PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
DESC="Unicorn server" | |
NAME=unicorn | |
RVM=/usr/local/rvm/bin/rvm | |
RVM_EXEC_ARGS="1.9.3@application exec" | |
RAILS_DIR=/data/application | |
DAEMON=$RVM | |
DAEMON_ARGS="$RVM_EXEC_ARGS $RAILS_DIR/bin/unicorn -c $RAILS_DIR/config/unicorn.rb -E staging -D" |
# Copyright (c) 2012, Thomas Stachl <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | |
# associated documentation files (the "Software"), to deal in the Software without restriction, | |
# including without limitation the rights to use, copy, modify, merge, publish, distribute, | |
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or | |
# substantial portions of the Software. |
# | |
# Some helper methods | |
# | |
app = | |
activePage: -> | |
$(".ui-page-active") | |
reapplyStyles: (el) -> |
iframe { | |
max-width: 100%; | |
} |
NOTE I now use the conventions detailed in the SUIT framework
Used to provide structural templates.
Pattern
t-template-name
/* | |
You can now create a spinner using any of the variants below: | |
$("#el").spin(); // Produces default Spinner using the text color of #el. | |
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el. | |
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color). | |
$("#el").spin({ ... }); // Produces a Spinner using your custom settings. | |
$("#el").spin(false); // Kills the spinner. |
# This program is free software. It comes without any warranty, to | |
# the extent permitted by applicable law. You can redistribute it | |
# and/or modify it under the terms of the Do What The Fuck You Want | |
# To Public License, Version 2, as published by Sam Hocevar. See | |
# http://sam.zoy.org/wtfpl/COPYING for more details. | |
set :application, "nodeapp" | |
set :scm, :git | |
set :repository, "git://github.com:hogehoge/foobar.git" | |
set :branch, "master" |
Vagrant::Config.run do |config| | |
# ... | |
config.vm.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] | |
end |
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
# # your config.ru | |
# require 'unicorn_killer' | |
# use UnicornKiller::MaxRequests, 1000 | |
# use UnicornKiller::Oom, 400 * 1024 | |
module UnicornKiller | |
module Kill | |
def quit | |
sec = (Time.now - @process_start).to_i | |
warn "#{self.class} send SIGQUIT (pid: #{Process.pid})\talive: #{sec} sec" |