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/bash | |
touch /root/part1 | |
./symfony csv:import /root/cva_pr_final_0.csv --rows-until-update=5 --error-log=/root/errors_0.log --source-name=cva | |
touch /root/part2 | |
./symfony csv:import /root/cva_pr_final_1.csv --rows-until-update=5 --error-log=/root/errors_1.log --source-name=cva | |
touch /root/part3 | |
./symfony csv:import /root/cva_pr_final_2.csv --rows-until-update=5 --error-log=/root/errors_2.log --source-name=cva | |
touch /root/part4 | |
./symfony csv:import /root/cva_pr_final_3.csv --rows-until-update=5 --error-log=/root/errors_3.log --source-name=cva | |
touch /root/part5 |
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
<html> | |
<head> | |
<script> | |
function sopaRedirect() { | |
var d = new Date(); | |
var curr_date = d.getDate(); | |
var curr_month = d.getMonth() + 1; //months are zero based | |
var curr_year = d.getFullYear(); | |
var date = curr_year + "-" + curr_month + "-" + curr_date; |
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
sudo npm install -g deja | |
sudo npm install -g jshint-runner | |
sudo npm install -g nmd |
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
// from Horofox in #node.js | |
var mongoose = require('mongoose'); | |
var db = mongoose.connect('mongodb://localhost/mydb'); | |
function allowPosts(mongoose) { | |
var Schema = mongoose.Schema; | |
var Posts = new Schema({ | |
name : String, | |
subject: String, | |
comment : String, |
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 connect = require('connect'), | |
form = require('connect-form'); | |
var server = connect.createServer( | |
form({ keepExtensions: true }), | |
function(req, res, next){ | |
// Form was submitted | |
if (req.form) { | |
// Do something when parsing is finished | |
// and respond, or respond immediately |
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
check process node with pidfile /var/run/node.pid | |
start program = "start/node/app" | |
stop program = "stop/noe/app" | |
if failed host www.myappcom port 80 protocol http | |
with timeout 25 seconds | |
then restart | |
group server |
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 yaml = require('yaml') | |
, fs = require('fs') | |
, should = require('should') | |
var ideal = { | |
jim: 'Hey there.', | |
bob: 'I am the law!\nYou will kneel!', | |
rick: 'Sure' | |
} |
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
jim: Hey there. | |
bob: | | |
I am the law! | |
You will kneel! | |
rick: Sure |
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 dependencies. | |
*/ | |
var mongoose = require('mongoose') | |
, Schema = mongoose.Schema | |
mongoose.connect('mongodb://localhost/BB') | |
/** |
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
# Rate limiting for SSH requests -A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 22 -m recent --set -A RH-Firewall-1-INPUT -m state --state NEW -p tcp --dport 22 -m recent --update --seconds 60 --hitcount 4 -j DROP |