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
var getSlug = require('speakingurl'); | |
slug = getSlug('Apple & Pear!'); | |
console.log(slug); | |
// Output: apple-and-pear | |
slug = getSlug('Foo ♥ Bar'); | |
console.log(slug); | |
// Output: foo-love-bar |
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
var ytdl = require('ytdl') | |
function stream(req,res,id) { | |
var dl = ytdl('http://www.youtube.com/watch?v='+id, { | |
quality:43 //poor quality leave empty for good quality | |
}) | |
dl.pipe(res); | |
} |
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
#curl https://gist.githubusercontent.com/einfacheruser/77bd850d5c270bf7cad4/raw/ff398380c2c8a1dad17ce00a307223fb57fcba24/gistfile1.txt | sh | |
sudo fallocate -l 4G /swapfile | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile |