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
#!/bin/bash | |
set -e | |
# Donwload no-ip2 software | |
donwload() { | |
cd /usr/local/src/ | |
sudo wget http://www.noip.com/client/linux/noip-duc-linux.tar.gz | |
} | |
# Unzip tar |
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> | |
<meta charset="UTF-8"> | |
<title>Server-sent events demo</title> | |
</head> | |
<body> | |
<button>Close the connection</button> | |
<ul> | |
</ul> |
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 checkAll(){ | |
$("#checkTodos").click(function(){ | |
$('input:checkbox').not(this).prop('checked', this.checked); | |
}); | |
} | |
document.ready(function(){ | |
checkAll(); | |
}); |
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
<?php | |
define('_JEXEC', 1); | |
define('JPATH_BASE', '../'); | |
define('DS', DIRECTORY_SEPARATOR); | |
require_once('../configuration.php'); | |
require_once(JPATH_BASE . DS . 'includes' . DS . 'defines.php'); | |
require_once(JPATH_BASE . DS . 'includes' . DS . 'framework.php'); | |
$mainframe = JFactory::getApplication('site'); | |
$mainframe->initialise(); |
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 eachWithIdx(iterable, f) { | |
var i = iterable.iterator(); | |
var idx = 0; | |
while (i.hasNext()) f(i.next(), idx++); | |
} | |
function repeatStringNumTimes(string, times) { | |
var repeatedString = ""; | |
while (times > 0) { |