This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DownloadAndWriteToCache | |
include Sidekiq::Worker | |
def perform(url, cache_id, name, meta) | |
... | |
end | |
def on_job_done(args) | |
url = args[0] | |
cache_id = args[1] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sidekiq.configure_server do |config| | |
... | |
config.server_middleware do |chain| | |
chain.add Middleware::Server::JobDone | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Middleware::Server | |
class OnJobComplete | |
def call(worker, msg, queue) | |
yield | |
args_to_job = msg["args"] | |
worker.on_job_complete(args_to_job) if worker.respond_to?(:on_job_complete) | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
need to convert styles in query params to css props object | |
// e.g. if URL is like | |
http://localhost:8080/?header-color=0c1119 | |
&header-background-color=fff | |
&body-color=000 | |
&body-background-color=e5822d | |
&button-color=909694 | |
&button-background-color=f442dc | |
&button-hover-color=2de5a8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ViewId; | |
var groupId; | |
var op; | |
var enterpriseId; | |
$(function(){ | |
enterpriseId = $("#enterpriseId").val(); | |
$("#bAddGroupView").click(function() { | |
changeRightPanel('addEditDeleteGroupView.jsp?op=add&enterpriseId='+enterpriseId); | |
return false; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON( 'package.json' ), | |
concat: { | |
libs: { | |
src: [ | |
'lib/jquery.js', | |
'lib/handlebars.js', | |
'lib/ember.js', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- restart mysql server | |
sudo /etc/init.d/mysql restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Responsive styles*/ | |
/*End of responsive*/ | |
/* CHAT WINDOW STYLES*/ | |
// .chat-window{ | |
// border: 1px solid; | |
// width: 300px; | |
// position: fixed; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row-fluid"> | |
<div class="span4"> | |
<img class="publish_Mand publishMandatory" src="imgs/Buttons/pub_required.png"> | |
<label>Subject</label> | |
</div> | |
<div class="disableSub"></div> | |
<div class="span8"> | |
<div id="slct_subjects" class="wrapper-dropdown-3 " tabindex="1"> | |
<% _(model.contentTypeMetaData).each(function(obj) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find and copy files recursively | |
find . -name '*.html' -or -name '*.js' | cpio -updm /path/to/dest |