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 java.util.Scanner; | |
| /* | |
| * IsonProjects | |
| */ | |
| public class Vignere { | |
| private final String alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
| private char matrix[][]; |
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
| socket.on('*', function(msg) { | |
| isLoggedIn(socket.request, null, function(){ | |
| if (clientSockets[socket.request.sessionID]){ | |
| callbacks[msg.data[0]](io, socket, msg.data[1]); | |
| } | |
| else{ | |
| sockbase.onLogout(io, socket, null); | |
| socket.emit('failure', 'you are logged out'); | |
| socket.disconnect(); |
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
| function isLoggedIn(req, res, next){ | |
| if (req.isAuthenticated()){ | |
| return next(); | |
| } | |
| res.redirect('/'); | |
| }; |
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 session = require('express-session'); | |
| var credentials = require('./config/credentials') | |
| var cookieParser = require('cookie-parser'); | |
| var mongoose = require('mongoose'); | |
| var bodyParser = require("body-parser"); | |
| var app = express(); | |
| app.use(bodyParser.json()); | |
| app.use(bodyParser.urlencoded({ extended: 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
| app.get('/dashboard', isLoggedIn, function(req, res){ | |
| req.user.role = req.session.role; | |
| var client = {}; | |
| if (req.user.facebook){ | |
| client = { | |
| user : { | |
| name : req.user.facebook.name, | |
| profilePic : req.user.facebook.profilePic, | |
| role : req.user.role |
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
| app.get('/auth/facebook', passport.authenticate('facebook', { scope : 'email' })); | |
| app.get('/auth/facebook/callback', passport.authenticate('facebook', { | |
| successRedirect : '/dashboard', | |
| failureRedirect : '/' | |
| })); |
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 Appbase = require('appbase-js'); | |
| var FacebookStrategy = require('passport-facebook').Strategy; | |
| var TwitterStrategy = require('passport-twitter').Strategy; | |
| var credentials = require('../config/credentials') | |
| var appbaseRef = new Appbase({ | |
| url: credentials.appbaseAuth.url, | |
| appname: credentials.appbaseAuth.appName, | |
| username: credentials.appbaseAuth.userName, | |
| password: credentials.appbaseAuth.password |
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
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>AppbaseOAuth2</title> | |
| <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css"> | |
| <link rel="stylesheet" href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css"> | |
| <style> |
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.exports = { | |
| 'appbaseAuth' : { | |
| 'url' : 'https://scalr.api.appbase.io', | |
| 'appName' : 'APP NAME FROM APPBASE DASHBOARD', | |
| 'userName' : 'USER NAME FROM APPBASE DASHBOARD', | |
| 'password' : 'PASSWORD FROM APPBASE DASHBOARD' | |
| }, | |
| 'facebookAuth' : { | |
| 'clientID' : 'GET YOUR CLIENT ID FROM FACEBOOK', |
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
| /* linux-lts-saucy-3.11.0/arch/x86/kvm/vmx.c */ | |
| static int handle_exception(struct kvm_vcpu *vcpu) | |
| { | |
| ... | |
| enum emulation_result er; | |
| struct x86_emulate_ctxt *ctxt; | |
| ... | |
| if (is_invalid_opcode(intr_info)) { |
NewerOlder