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 jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
// ... give time for script to load, then type. | |
jQuery.noConflict() |
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
//class="chkSelectAll" esta en el checkbox principal(th) que debe seleccionar todos los usuarios | |
//class="file-todo" son los checkbox particulares de cada td en una tabla | |
$('.chkSelectAll').click(function () { | |
$('.file-todo').prop('checked', $(this).is(':checked')); | |
}); | |
$('.file-todo').click(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
<!doctype html> | |
<html> | |
<head> | |
<link href="http://s3.amazonaws.com/codecademy-content/courses/ltp2/css/bootstrap.min.css" rel="stylesheet"> | |
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'> | |
<style> | |
html,body { | |
font-family: 'Roboto', sans-serif; | |
color: #404040; | |
background-color: #eee; |
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
UPDATE TABLE SET COLUMN = REPLACE(COLUMN, 'oldvalue', 'newvalue') | |
WHERE COLUMN REGEXP 'oldvalue'; | |
Donde: | |
column es el nombre del campo en la tabla. | |
oldvalue es aquello que deseamos modificar. | |
newvalue es la nueva cadena que reemplaza la anterior |
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
<select class="grid-4" id="country" name="country"><option value="">Seleccionar país</option> | |
<option value="AF">Afganistán</option> | |
<option value="AL">Albania</option> | |
<option value="DE">Alemania</option> | |
<option value="AD">Andorra</option> | |
<option value="AO">Angola</option> | |
<option value="AI">Anguila</option> | |
<option value="AQ">Antártida</option> | |
<option value="AG">Antigua y Barbuda</option> | |
<option value="AN">Antillas Neerlandesas</option> |
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
public function index() | |
{ | |
$client = new Client(); | |
// Login page | |
$crawler = $client->request('GET', 'https://email.linc.do/iredadmin/login'); | |
$form = $crawler->selectButton('Login')->form(); | |
$crawler = $client->submit($form, array('username' => '[email protected]', '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
<VirtualHost *:80> | |
DocumentRoot /var/www/linc/public | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
ProxyRequests Off | |
<proxy *> | |
Order deny,allow | |
Allow from all | |
</proxy> | |
ProxyPreserveHost On |
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]; |
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" "$@" |