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
{ | |
"name": "Ejemplo", | |
"version": "0.0.1", | |
"dependencies": { | |
"express": "3.3.5" | |
} | |
} |
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 express = require('express'); | |
var app = express(); | |
app.set('view engine', 'ejs'); | |
app.use(express.bodyParser()); | |
app.get("/", function(req, res){ | |
res.send("<form action='/envio' method='post'> Nombre: <input type='text' name='name' /> <input type='submit' value'send' /></form> "); |
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
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 query = "http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid=76456&format=json" | |
url = query; | |
$.getJSON(url, function(data) { | |
console.log( data ); | |
}); |
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
$.ajax({ | |
type: "POST", | |
url: "/NewEmail", | |
data: { username: username } | |
}).done(function(data){ | |
if(data.success == false){ | |
var errores = ''; | |
for(datos in data.errors){ | |
errores += '<small >' + data.errors[datos] + '</small>'; | |
} |
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
try{ | |
$file = Archive::find($id); | |
if ($file) { | |
$file->delete(); | |
return Response::json(array( | |
'success' => true | |
)); | |
}else{ | |
return Response::json(array( | |
'success' => 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
yum install nano -y; yum update -y; yum upgrade -y; yum install tigervnc-server -y; yum groupinstall "Desktop" -y; yum install firefox -y; rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-x86_64-1.0-1.noarch.rpm; rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux; yum install flash-plugin nspluginwrapper alsa-plugins-pulseaudio libcurl -y; echo 'echo "nameserver 8.8.8.8" >> /etc/resolv.conf; ' >> /etc/rc.local; echo 'VNCSERVERS="1:root"' >> /etc/sysconfig/vncservers; echo 'VNCSERVERARGS[1]="-geometry 1000x700"' >> /etc/sysconfig/vncservers; vncpasswd; chkconfig vncserver on --level 345; reboot; |
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
$webservice = file_get_contents("http://graph.facebook.com/linc.do"); | |
$json = json_decode($webservice); | |
var_dump($json->likes); |
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 yum install wget | |
wget http://chrome.richardlloyd.org.uk/install_chrome.sh | |
chmod u+x install_chrome.sh | |
./install_chrome.sh | |
execute "Please start Google Chrome as a normal user." | |
Open /opt/google/chrome folder | |
open google-chrome file or vi google-chrome | |
exec -a "$0" "$HERE/chrome" "$@" |
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
<img onclick="jQuery('#file').click()" id="imageUpload" src="uploads/images/flyer_picture/{{$fly->detail}}" style="width:200px;height:200px;"/> | |
<input type="file" id="file" name="pic" style="display: none;"/> | |
<script> | |
//------------------------------------------- | |
//Subir imagen | |
$("#file").change(function(){ | |
readURL(this); | |
var inputFileImage = document.getElementById("file"); | |
var file = inputFileImage.files[0]; |
OlderNewer