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
<div class="content clearfix"> | |
<div>Comments :3</div> | |
<div class="media media--farnet"> | |
<div class="media-body"> | |
<div class="field field-name-field-ne-body field-type-text-with-summary field-label-hidden"> | |
<div class="field-items"> | |
<div class="field-item even"> | |
<p>Body from Discussion in IT support</p> | |
</div> | |
</div> |
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
1 function cleanObject(obj) { | |
2 for (var propName in obj) { | |
3 if (obj[propName] === null || obj[propName] === undefined || obj[propName] === 0) { | |
4 delete obj[propName]; | |
5 } | |
6 } | |
7 } |
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
const path = require('path'); | |
const standardVersion = require('standard-version'); | |
const conventionalGithubReleaser = require('conventional-github-releaser'); | |
const ghReleaseAssets = require('gh-release-assets'); | |
const simpleGit = require('simple-git')(); | |
const fs = require('fs'); | |
const archiver = require('archiver'); | |
// Retrieve GitHub token from environment | |
const token = process.env.RELEASE_TOKEN; |
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
'use strict' | |
// Dependencies | |
const EventEmitter = require('events').EventEmitter | |
const path = require('path') | |
// Definition | |
function findFiles (files, extension, cb = null) { | |
const emitter = new EventEmitter() | |
const errorMessage = 'no files supplied'; |
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
'use strict' | |
// Dependencies | |
const EventEmitter = require('events').EventEmitter | |
const path = require('path') | |
// Definition | |
class FindFiles extends EventEmitter { | |
constructor (extension) { |
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
findFiles(process.argv.slice(2), '.js') | |
.on('match', file => console.log(file + ' is a match')) | |
.on('error', err => console.log('Error emitted: ' + err.message)) |
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
// Give a list of files all of them which match an extension | |
function findFiles (files, extension) { | |
const emitter = new EventEmitter() | |
if (files.length === 0) { | |
// yield an error | |
emitter.emit('error', 'no files supplied') | |
} | |
// Check for matches |
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
#!/usr/bin/env node | |
'use strict'; | |
var https = require('https'); | |
var cheerio = require('cheerio'); | |
var base = 'https://www.packtpub.com/' | |
var freeEbookURL = base + 'packt/offers/free-learning'; |
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
# Temporary files | |
.tmp | |
# Production files | |
dist | |
# Logs | |
logs | |
*.log | |
npm-debug.log* |
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
{ | |
"data": [ | |
{ | |
"name": "Учебни програми за II клас", | |
"class": 2, | |
"goals": [ | |
"Mathematics": [ | |
"Числа": ["Познава естествените числа до 100.", "Познава принципа за построяване на редицата на числата до 100.", "Извършва аритметичните действия събиране и изваждане с числата до 100."], | |
"Геометрични фигури и тела": ["Познава геометричните фигури триъгълник, правоъгълник и квадрат и елементите им.", "Определя вида на триъгълник според страните."] | |
] |