Get the most recommended games from steam (because steam does not tell...) this is an example and no invitation to DDos steam ;)
This file contains 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 Sequelize = require('sequelize') | |
, sequelize = new Sequelize('sequelize_test', 'root', null, { | |
logging: false | |
}) | |
var Project = sequelize.define('project', { | |
name: Sequelize.STRING | |
}) | |
var Task = sequelize.define('task', { |
This file contains 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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Sascha Depold http://depold.com | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains 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 Sequelize = require("sequelize") | |
var sequelize = new Sequelize('database', 'root') | |
var User = sequelize.define('User', { username: Sequelize.STRING }) | |
var Comment = sequelize.define('Comment', { text: Sequelize.TEXT }) | |
User.hasMany(Comment) | |
Comment.belongsTo(User) | |
sequelize.sync({force: true}).success(function() { |
This file contains 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
const Sequelize = require("sequelize") | |
//////////////////// | |
// database setup // | |
//////////////////// | |
var sequelize = new Sequelize('master-thesis', 'root', null, { | |
logging: false | |
}) |
This file contains 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 Sequelize = require('sequelize') | |
, sequelize = new Sequelize('sequelize_test', 'root') | |
var User = sequelize.define('User', { | |
username: Sequelize.STRING, | |
password_hash: Sequelize.STRING | |
}, { | |
validate: { | |
password: function(next) { | |
if (((this._password || "").trim() !== '') && (this._password === this._password_confirmation)) { |
This file contains 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 Sequelize = require('sequelize') | |
, sequelize = new Sequelize('sequelize_test', 'root') | |
var Manufacturer = sequelize.define('manufacturer', { | |
name: Sequelize.STRING | |
}); | |
var GraphicsCard = sequelize.define("graphics_card", { | |
model: Sequelize.STRING, | |
RAM: Sequelize.INTEGER |
This file contains 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
fn get_path_to(target: & str, opt: Option<&str>) -> Path { | |
let path: ~str = match target { | |
"root" => { | |
os::homedir().unwrap().to_str() + "/.rsvm" | |
} | |
"version" => { | |
get_path_to(~"root", None).to_str() + ~"/v" + opt.unwrap() | |
} |
This file contains 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
fn get_rsvm_directory() -> ~str { | |
os::homedir().get_ref().to_str() + "/.rsvm" | |
} |
This file contains 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 [ ! -z "$IOJS" ] && [ "$IOJS" != "false" ]; then | |
echo "Installing io.js v$IOJS ..." | |
curl -s https://iojs.org/dist/v$IOJS/iojs-v$IOJS-linux-x64.tar.xz > iojs-v$IOJS-linux-x64.tar.xz | |
tar xf iojs-v$IOJS-linux-x64.tar.xz | |
export PATH="$(pwd)/iojs-v$IOJS-linux-x64/bin/:$PATH" | |
echo "Installation successful" | |
else | |
echo "Using node..." | |
fi |
NewerOlder