View selectize.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
# Checkout vendor repo
echo "Cloning brianreavis/selectize.js github repo into tmp_vendor"
git clone https://github.com/brianreavis/selectize.js.git tmp_vendor
 
# Copy files
echo "Copying selectize.js"
mkdir -p app/assets/javascripts/vendor/selectize/
cp tmp_vendor/dist/js/standalone/selectize.js app/assets/javascripts/vendor/selectize/selectize.js
View nginx_php_cache.conf
1 2 3 4 5 6 7 8 9 10
server {
server_name domain;
rewrite ^/(.*) http://www.domain/$1 permanent;
access_log /dev/null;
error_log /dev/null;
}
 
server {
server_name www.domain;
root /home/deployer/apps/appname/current;
View php_init.sh
1 2 3 4 5 6 7 8 9 10
#!/bin/bash
 
# https://www.linode.com/docs/websites/nginx/nginx-and-phpfastcgi-on-ubuntu-10-04-lts-lucid
 
PHP_SCRIPT=/home/deployer/.php/appname/run.sh
FASTCGI_USER=deployer
FASTCGI_GROUP=deployer
PID_DIR=/home/deployer/.php/appname
PID_FILE=/home/deployer/.php/appname/php-fastcgi.pid
RET_VAL=0
View php_run.sh
1 2 3 4 5 6 7 8 9
#!/bin/bash
 
FASTCGI_USER=deployer
FASTCGI_GROUP=deployer
ADDRESS=127.0.0.1
PORT=9000
PIDFILE=/home/deployer/.php/appname/php-fastcgi.pid
CHILDREN=3
PHP5=/usr/bin/php5-cgi
View nginx_php.conf
1 2 3 4 5 6 7 8 9 10
server {
server_name domain;
rewrite ^/(.*) http://www.domain/$1 permanent;
access_log /dev/null;
error_log /dev/null;
}
 
server {
server_name domain;
root /home/deployer/apps/appname/current;
View inject.js
1 2 3
$('.item').each(function(i) {
$(this).append('<a style="position:absolute;top:0;right:0" href="' + '/x/a/' + $(this).data('id') + '">X</a>')
});
View index.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
div {
display: none;
width: 100px; height: 100px;
View facebook-dl
1 2 3
# Ex.: https://www.facebook.com/video.php?v=469066063208329
 
video=469066063208329; curl -s $(curl -s https://www.facebook.com/video.php?v=$video | grep -o 'https.*thumbnail_src' | sed 's/\\u00253A/:/g' | sed 's/\\u00255C\\u00252F/\//g' | sed 's/\\u002526/\&/g' | sed 's/\\u00253D/=/g' | sed 's/\\u00253F/?/g' | sed 's/\\u002522\\u00252C\\u002522thumbnail_src//g') > $video.mp4
View nginx.conf
1 2 3 4 5 6 7 8 9
# use the socket we configured in our unicorn.rb
upstream unicorn_appname {
server unix:/tmp/unicorn.appname.sock fail_timeout=0;
}
 
server {
listen 80;
server_name appname.com.br;
rewrite ^/(.*) http://www.appname.com.br/$1 permanent;
View gist:b182209fbe127fea46c1
1 2 3 4 5 6 7 8 9
 
QSemaphore semaphorePlacedActivity;
QSemaphore finishedSemaphore;
 
extern Timetable gt;
 
static bool swappedActivities[MAX_ACTIVITIES];
 
static bool foundGoodSwap;
Something went wrong with that request. Please try again.