Skip to content

Instantly share code, notes, and snippets.

View Alcoine's full-sized avatar
🎯
Focusing

Vladimir Ivanov Alcoine

🎯
Focusing
  • San Francisco
View GitHub Profile
@Alcoine
Alcoine / mocha-guide-to-testing.js
Created September 4, 2019 17:43 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@Alcoine
Alcoine / js-task-1.md
Created August 1, 2019 22:35 — forked from codedokode/js-task-1.md
Задания на яваскрипт (простые)
@Alcoine
Alcoine / walksync.js
Created June 14, 2019 21:30 — forked from kethinov/walksync.js
List all files in a directory in Node.js recursively in a synchronous fashion
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
filelist = walkSync(dir + file + '/', filelist);
}
else {
@Alcoine
Alcoine / Knex-Migrations-Seeding.md
Created April 5, 2019 17:12 — forked from NigelEarle/Knex-Migrations-Seeding.md
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@Alcoine
Alcoine / css_reset.css
Created December 12, 2018 00:06 — forked from freetonik/css_reset.css
Eric Meyer’s CSS Reset 2.0
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@Alcoine
Alcoine / gist:44a56bc4735d9d01e207773b35a3e3a3
Created June 26, 2018 21:42 — forked from paulallies/gist:0052fab554b14bbfa3ef
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master