- Create a new file inside the folder you created to store your Youtube downloads. Call it dl.sh
- Paste the code above and save
- Open terminal, and type: cd YoutubeDownloads (replace YouTubeDownloads with the folder you created)
- Type: chmod +x dl.sh
- Now enter: ./dl.sh https://www.youtube.com/watch?v=p-GFsk5vE6o
- Wait for download to complete :)
This file contains 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
// Calling wait and passing a callback | |
wait(1000, (err, data) => { | |
// Did the function return an error? | |
if (err) throw new Error(err); | |
// Output the data | |
console.log(data); | |
}); |
This file contains 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 function waits for an unknown amount of time | |
const wait = (delay, callback) => { | |
// setInterval returns an ID. We need this to stop the timer | |
const id = setInterval(() => { | |
// Generate a random number between 0 and 1 | |
const rand = Math.random(); | |
if (rand > 0.95) { | |
// Call the callback function. Note the first parameter is an error | |
callback(null, 'Congratulations, you have finished waiting.'); |
This file contains 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
node promisify.js | |
Waiting ... | |
Waiting ... | |
Waiting ... | |
Waiting ... | |
Waiting ... | |
Waiting ... | |
Waiting ... | |
Waiting ... | |
[Error]: Could not wait any longer! |
This file contains 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
<script>alert(123);</script> | |
<ScRipT>alert("XSS");</ScRipT> | |
<script>alert(123)</script> | |
<script>alert("hellox worldss");</script> | |
<script>alert(“XSS”)</script> | |
<script>alert(“XSS”);</script> | |
<script>alert(‘XSS’)</script> | |
“><script>alert(“XSS”)</script> | |
<script>alert(/XSS”)</script> | |
<script>alert(/XSS/)</script> |
This file contains 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
global | |
log /dev/log local0 | |
log /dev/log local1 notice | |
chroot /var/lib/haproxy | |
stats socket /run/haproxy/admin.socket mode 660 level admin | |
stats timeout 30s | |
user haproxy | |
group haproxy | |
daemon | |
maxconn 2048 |
This file contains 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: Install haproxy | |
apt: name=haproxy state=latest | |
- name: Creating /var/www directory | |
file: | |
path: /var/www | |
state: directory | |
owner: "{{ user }}" | |
group: "{{ user }}" |
This file contains 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
?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>LocationServicesEnabled</key> | |
<data> | |
AQ== | |
</data> | |
<key>SystemAudioVolume</key> | |
<data> |
This file contains 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 GroupRepository | |
{ | |
private $groupModel; | |
public function __construct(Group $groupModel) | |
{ | |
$this->groupModel = $groupModel; | |
} | |
public function create($creatorID, $image, $name, $description) |
This file contains 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
$container['GroupRepository'] = function() { | |
return new StudentApp\Repositories\GroupRepository( | |
new \StudentApp\Models\Group | |
); | |
}; |