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
$("#btnExportHTMLToCSV").click((event) -> | |
$table = $("#tableToExport") | |
if !$table | |
return false | |
headers = [] | |
csv = "" | |
$table.find("thead th").each(() -> | |
$th = $(this) | |
text = $th.text() | |
header = '"'+text+'"' |
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
# | |
# You should add the Facebook App ID and the channel url (optional), in the #fb-root element, as a data- attribute: | |
# <div id="fb-root" data-app-id="<%= ENV['FACEBOOK_APP_ID'] %>" data-channel-url="<%= url_no_scheme('/channel.html') %>"></div> | |
# | |
window.fbAsyncInit = -> | |
FB.init | |
appId: document.getElementById("fb-root").getAttribute("data-app-id") | |
channelUrl: document.getElementById("fb-root").getAttribute("data-channel-url") | |
status: true, | |
cookie: true, |
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 FacebookClubsController < ApplicationController | |
layout "facebook_canvas" | |
after_filter :allow_iframe | |
def index | |
end | |
private | |
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
# | |
# If you are working with the foreman gem and .env files, you are probably need to load | |
# the environment varialbes from the .env file. | |
# | |
# Load the environment variables from the .env file in development. | |
open('.env', 'r').readlines.each {|l| kv = l.split('='); ENV[kv[0]] = kv[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
#!/bin/sh | |
APP_PATH=/var/www/app | |
# Production environment | |
export RAILS_ENV="production" | |
exit_with_error(){ | |
echo "---> An Error Has Occurred!" | |
} |
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
./configure \ | |
--user=nginx \ | |
--group=nginx \ | |
--prefix=/usr/share/nginx/nginx-1.7.12 \ | |
--add-module=../nginx-rtmp-module-master \ | |
--sbin-path=/usr/local/sbin/nginx \ | |
--conf-path=/usr/share/nginx/nginx-1.7.12/conf/nginx.conf \ | |
--pid-path=/var/run/nginx.pid \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/varlog/nginx/access.log |
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
#!/bin/sh | |
# /<REPOS-PATH>/<REPO-NAME>.git/hooks/post-receive | |
APP_PATH=/<APP-PATH> | |
exit_with_error(){ | |
echo "---> An Error Has Occurred!" | |
} | |
echo "---> Receiving push as $USER" | |
git --work-tree=/<APP-PATH> --git-dir=/<REPOS-PATH>/<REPO-NAME>.git checkout -f |
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
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
env PORT=<APP-PORT> | |
setuid <APP-NAME> | |
chdir /<APP-PATH> |
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
# | |
# Import videos from CSV | |
# | |
# CSV row: | |
# 0 - embedded_video | |
# 1 - link | |
# 2 - categories (Funny;Euro;Cam) | |
# 3 - rating | |
# 4 - author username |
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
#!/bin/sh | |
APP_PATH=$APP_ROOT | |
exit_with_error(){ | |
echo "---> An Error Has Occurred!" | |
} | |
echo "---> Receiving push as $USER" | |
git --work-tree=$APP_PATH --git-dir=$GIT_DIR checkout -f |
OlderNewer