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
{ | |
"presets": [ | |
[ | |
"@babel/env", | |
{ | |
"modules": "commonjs" | |
} | |
], | |
[ | |
"@babel/typescript", { |
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
# cat ~/chroot-ubuntu.sh | |
mount /ubuntu | |
mount --rbind /dev /ubuntu/dev | |
mount --rbind /proc /ubuntu/proc | |
mount --rbind /sys /ubuntu/sys | |
mount --rbind /home /ubuntu/home | |
mount --rbind /run /ubuntu/run | |
chroot /ubuntu |
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
[Unit] | |
Description=preload daemon | |
After=syslog.target | |
[Service] | |
ExecStart=/usr/sbin/preload -c /etc/preload.conf -s /var/lib/preload/preload.state -l /var/log/preload.log | |
Type=forking | |
[Install] | |
WantedBy=multi-user.target |
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
function fibonacci(n, cb) { | |
console.log(n) | |
if (n < 2) | |
cb(1); | |
else | |
fibonacci(n-2, function(wynik) { | |
fibonacci(n-1, function(wynik2) { | |
cb(wynik + wynik2) | |
}) | |
}) |
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 request = require('request'); | |
var cheerio = require('cheerio'); | |
var pages, channel, link, url, page, week, songCount, list; | |
getMusic = function (link, pages, callfuck) { | |
console.log('Initializing Music retrieval...'); | |
for (pageX = 0; pageX <= pages; pageX++) { | |
url = link + pageX; | |
console.log(url, pageX); |
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 request = require('request'); | |
var cheerio = require('cheerio'); | |
var pages, channel, link, url, page, week, songCount, list; | |
getMusic = function (link, pages, callfuck) { | |
console.log('Initializing Music retrieval...'); | |
for (pageX = 0; pageX <= pages; pageX++) { | |
url = link + pageX; | |
console.log(url, pageX); |
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
getMusic = function (link, pages) { | |
console.log('Initializing Music retrieval...'); | |
for (pageX = 0; pageX <= pages; pageX++) { | |
url = link + pageX; | |
getPage(pageX); | |
}; | |
}; | |
function getPage (pageX) { | |
console.log('enter get page'); |
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
setTimout -> | |
$('#foo').fadeOut 200, -> | |
$('.bar').css background: 'red' | |
console.log 'done' | |
,1000 | |
# VS | |
delay = (ms, cb)-> setTimeout(cb, ms) |
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
set shiftwidth=2 | |
set softtabstop=2 | |
function Rb_or_gemfile() | |
if bufname('%') == 'Gemfile' | |
execute '!bundle' | |
else | |
execute '!ruby %' | |
endif | |
endfunction |
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
require 'scrapify' | |
require 'models' | |
module HN | |
class Scraper < Scrapify::Page | |
encoding 'utf-8' | |
fields = { |
NewerOlder