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 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
const Sequelize = require("sequelize") | |
//////////////////// | |
// database setup // | |
//////////////////// | |
var sequelize = new Sequelize('master-thesis', 'root', null, { | |
logging: 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
var Sequelize = require("sequelize") | |
, sequelize = new Sequelize('database', 'root') | |
var MainClient = sequelize.define('main_client', { | |
name: Sequelize.STRING | |
}, { | |
freezeTableName: true | |
}) | |
var MainDashboard = sequelize.define('main_dashboard', { |
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 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 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 Sequelize = require("sequelize") | |
, sequelize = new Sequelize('sequelize_test', 'root', null, {logging: false}) | |
var User = sequelize.define('User', { username: Sequelize.STRING }) | |
, Product = sequelize.define('Product', { title: Sequelize.STRING }) | |
, Purchase = sequelize.define('Purchase', { comment: Sequelize.TEXT }) | |
User.hasMany(Purchase) | |
Purchase.belongsTo(Product) | |
Purchase.belongsTo(User) |
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> | |
<title></title> | |
<script src="jquery-rss/lib/jquery-1.6.4.min.js"></script> | |
<script src="jquery-rss/src/jquery.rss.js"></script> | |
<script> | |
$(function() { | |
$('#rss').rss('http://www.formula1.com/rss/news/latest.rss') | |
}) | |
</script> |
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
javascript:(function(a,b,c,d){d=jQuery.extend({offsetX:0,offsetY:0},d||{});var e=jQuery(c).outerHeight(),f=jQuery(c).outerWidth(),g=jQuery(c).position().left,h=jQuery(c).position().top,i=function(a,b,c,d,e){jQuery("<div>").addClass("grid").css("position","absolute").css("left",a+"px").css("top",b+"px").css("width",c+"px").css("height",d+"px").css(e,"1px solid rgba(0,0,0,0.2)").css("z-index","1000000").appendTo(jQuery("body"))};jQuery(".grid").remove();for(var j=h+d.offsetY;j<=h+e-d.offsetY;j+=b)i(g+d.offsetX,j,f-2*d.offsetX,0,"border-bottom");for(var j=g+d.offsetX;j<=g+f-d.offsetX;j+=a)i(j,h+d.offsetY,0,e-2*d.offsetY,"border-right")})(10,18,"#content",{offsetX:15,offsetY:0}) |
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
tag("img", {:src => 'http://de.example.com?foo=bar&hello=world'}) | |
=> "<img src=\"http://de.example.com?foo=bar&hello=world\" />" | |
image_tag('http://de.example.com?foo=bar&hello=world') | |
=> "<img alt=\"De\" src=\"http://de.example.com?foo=bar&hello=world\" />" |
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 Sequelize = require("sequelize") | |
, sequelize = new Sequelize('sequelize_test', 'root') | |
var User = sequelize.define('User', { | |
name: Sequelize.STRING, | |
age: Sequelize.INTEGER | |
}) | |
User.sync({force: true}).on('success', function() { | |
var done = 0 |
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 benchmark = function(func, label) { | |
label = label || "benchmark" | |
console.time(label) | |
func.call(null) | |
console.timeEnd(label) | |
} | |
var arr = [] | |
var isEven = function(elem) { | |
return elem % 2 == 0 | |
} |