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
"Indent1": { | |
"prefix": "ind1", | |
"body": "<!--1 Indent--> ", | |
"description": "4 's" | |
}, | |
"Indent2": { | |
"prefix": "ind2", | |
"body": "<!--2 Indent--> ", | |
"description": "8 's" | |
}, |
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
"Unordered List (x1)": { | |
"prefix": "ul", | |
"body": [ | |
"<ul>", | |
" <li>$0</li>", | |
"</ul>" | |
], | |
"description": "ul > li " | |
} |
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
// ... | |
atom-workspace, | |
atom-text-editor { | |
font-family: "Fira Code"; | |
text-rendering: optimizeLegibility; | |
font-size: 17px; | |
font-weight: 400; | |
line-height: 1.8; | |
} |
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
exports.seed = function(knex, Promise) | |
{ | |
var tableName = 'Notes'; | |
var rows = | |
[ | |
{category_id: 1, subject_id: 1, title: 'Numero Uno', note: "Test #1"}, // 1 | |
{category_id: 2, subject_id: 1, title: 'Numero Dos', note: "Finish this list"}, // 2 | |
{category_id: 3, subject_id: 1, title: 'Numero Tres', note: "www.google.com"}, // 3 |
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
/* ID Generator: | |
* | |
* You can use an infinite while in a generator function to create | |
* a function that will generate a new ID every time next() is called on it. | |
* In this case the infinite loop is not dangerous | |
* because it will only execute once with calls to next(). | |
* | |
*/ | |
function* idGen(){ |
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
/** @babel */ | |
const fs = require('fs-plus') | |
const path = require('path') | |
const hasWriteAccess = (dir) => { | |
const testFilePath = path.join(dir, 'write.test') | |
try { | |
fs.writeFileSync(testFilePath, new Date().toISOString(), { flag: 'w+' }) | |
fs.unlinkSync(testFilePath) |
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
'use strict'; | |
module.exports = (fn) => { | |
return function () { | |
const length = arguments.length; | |
const args = new Array(length); | |
for (let i = 0; i < length; i += 1) { | |
args[i] = arguments[i]; |
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 wrapText (text, token) { | |
const length = token.length | |
if ((text.substr(0, length) === token) && (text.substr(-length) === token)) { | |
return text.substr(length, text.length - length * 2) | |
} else { | |
return token + text + token | |
} | |
} |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
OlderNewer