sudo yum update
##Install Redis https://gist.github.com/dstroot/2776679
wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
chmod 777 install-redis.sh
./install-redis.sh
| #!/bin/bash | |
| # | |
| # Watch current directory (recursively) for file changes, and execute | |
| # a command when a file or directory is created, modified or deleted. | |
| # | |
| # Written by: Senko Rasic <senko.rasic@dobarkod.hr> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
| <html> | |
| <head> | |
| <title>jsonp test</title> | |
| <script src="http://code.jquery.com/jquery-1.6.2.min.js"></script> | |
| <script type="text/javascript"> | |
| $(function(){ | |
| $('#select_link').click(function(e){ | |
| e.preventDefault(); | |
| console.log('select_link clicked'); | |
| var data = "do shash'owania"; | |
| var crypto = require('crypto'); | |
| crypto.createHash('md5').update(data).digest("hex"); |
| <%-- version1: java style --%> | |
| <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> | |
| <%@page import="java.util.Date"%> | |
| <%@page import="java.util.Calendar"%> | |
| <% pageContext.setAttribute("currentYear", java.util.Calendar.getInstance().get(java.util.Calendar.YEAR)); %> | |
| Current year is: <c:out value="${currentYear}" /> | |
| <%-- version2: JSTL style --%> | |
| <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> |
| var url = "http://cdn1.giltcdn.com/images/share/uploads/0000/0001/7250/172502872/420x560.jpg"; | |
| var encoded = new Buffer(url).toString('base64'); | |
| var decoded = new Buffer(encoded, 'base64').toString('ascii') | |
| console.log(encoded); | |
| console.log(decoded); |
| require 'tire' | |
| # Tire.configure { logger STDERR, level: 'debug' } | |
| Tire.index('movie-titles') do | |
| delete | |
| create \ | |
| settings: { | |
| index: { | |
| analysis: { |
| app.post('/login', function(req, res) { | |
| console.log(res); | |
| passport.authenticate('local', function(err, user) { | |
| if (req.xhr) { | |
| //thanks @jkevinburton | |
| if (err) { return res.json({ error: err.message }); } | |
| if (!user) { return res.json({error : "Invalid Login"}); } | |
| req.login(user, {}, function(err) { | |
| if (err) { return res.json({error:err}); } | |
| return res.json( |
| alias ng="npm list -g --depth=0 2>/dev/null" | |
| alias nl="npm list --depth=0 2>/dev/null" |
sudo yum update
##Install Redis https://gist.github.com/dstroot/2776679
wget https://raw.github.com/gist/2776679/04ca3bbb9f085b192f6aca945120fe12d59f15f9/install-redis.sh
chmod 777 install-redis.sh
./install-redis.sh
| package springbatch; | |
| import common.Greeting; | |
| import org.springframework.batch.core.Job; | |
| import org.springframework.batch.core.Step; | |
| import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing; | |
| import org.springframework.batch.core.configuration.annotation.JobBuilderFactory; | |
| import org.springframework.batch.core.configuration.annotation.StepBuilderFactory; | |
| import org.springframework.batch.core.launch.JobLauncher; | |
| import org.springframework.batch.core.launch.support.SimpleJobLauncher; |