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
{ | |
"editor.tabSize": 2, | |
"editor.fontSize": 15, | |
"window.zoomLevel": 0, | |
"editor.codeLens": true, | |
"editor.cursorStyle": "underline", | |
"editor.lineNumbers": "relative", | |
"workbench.welcome.enabled": false, | |
"workbench.colorTheme": "Dracula", | |
"workbench.iconTheme": "vscode-icons", |
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
{ | |
"Badge Text" : "", | |
"Ansi 5 Color" : { | |
"Green Component" : 0.4745098039215686, | |
"Blue Component" : 0.7764705882352941, | |
"Red Component" : 1 | |
}, | |
"Working Directory" : "\/Users\/scienceonlineed", | |
"Prompt Before Closing 2" : 0, | |
"Selected Text Color" : { |
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
# linux | |
df -bg |
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
const fs = require('fs'); | |
const path = require('path'); | |
const marked = require('marked'); | |
const cheerio = require('cheerio'); | |
var nodePandoc = require('node-pandoc'); | |
const location = './'; | |
/** | |
* Parse an outline to get the structure of a book | |
* @todo This just supports gitbook right now, add other parsers |
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 verbs = result.map(i => i.statement.verb.id); | |
var uniqueVerbs = verbs.filter((v, i, a) => a.indexOf(v) === 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
<?php | |
// iterative array | |
$array = array('apple', 'banana', 'pear'); | |
// or | |
$array = array(0 => 'apple', 1 => 'banana', 2 => 'pear'); | |
// associative array | |
$array = array('fruit' => 'apple', 'veggie' => 'cucumber'); | |
$array = array( |
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 people = ['Mike', 'Carly', 'Chuck']; | |
// old way | |
people.foreach(function(index, person) { | |
people[index] = 'Developer: ' + person; | |
}); | |
// new way :) | |
var newPeople = people.map(function(person) { | |
return 'Developer: ' + person; |
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 wide = true; | |
if (wide) { | |
return 'you are really big'; | |
} | |
else { | |
return 'you are very small'; | |
} |
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
<?php | |
function theme_form_element_label($variables) { | |
$_term = taxonomy_term_load($element['#return_value']); | |
$_image = field_view_field('taxonomy_term', $_term, 'field_camo_image', array('type'=>'image_url')); | |
// if the term has an image then we are going to use it | |
if ($_image) { | |
$radioimage_attrs['image'] = render($_image[0]); | |
} | |
} |