sudo npm update npm -g
npm ls -g --depth 0
name = Custom Pages Module | |
description = Provides routes and pages with custom themes. | |
core = 7.x |
#!/bin/bash | |
path=$1 | |
for file in $1/*; do | |
echo $file | |
filename=$(basename "$file" .mov) | |
filename=${filename//-/:} | |
filename=${filename//;/:} | |
echo "$filename" |
function isPalindrome(word) { | |
// split the word into array for easiness | |
var word1 = word.split(""); | |
// log | |
console.log(word); | |
// last array index of the word to count backwards | |
var backwardsCounter = word.length - 1; | |
// loop over the word, once forwards, once backwards | |
// if any letters do not match, it's not a palindrome |
function shuffle(array) { | |
var currentIndex = array.length, temporaryValue, randomIndex ; | |
// While there remain elements to shuffle... | |
while (0 !== currentIndex) { | |
// Pick a remaining element... | |
randomIndex = Math.floor(Math.random() * currentIndex); | |
currentIndex -= 1; |
// Fibonacci | |
//Looping | |
// seeds are 0,1,0 or 1,0,1 | |
console.log("Looping : \n"); | |
var result = 0, | |
term1 = 1, | |
term2 = 0; |
function example_form_alter(&$form, &$form_state, $form_id) { | |
// Alters the cart view form at /cart. | |
if ($form_id == 'uc_cart_view_form') { | |
// Hides the image column since courses don't have product images. | |
$form['items']['#columns']['image']['access'] = FALSE; | |
// Adds the label to the product description column from the image column. | |
$form['items']['#columns']['desc']['cell'] = t('Products'); | |
} | |
} |
'use strict'; | |
// fancy version uses a object with key and values to compare. | |
function fizzBuzzFancy (count) { | |
const set = { 'fizz': 3, 'buzz': 5 }; | |
for (let i = 1; i <= count; i++) { | |
let output = ''; | |
for (let word in set) { |
{ | |
"extends": "standard", | |
"rules": { | |
"semi": [2, "always"], | |
"no-extra-semi": 2 | |
} | |
} |
{ | |
"extends": "semistandard", | |
"plugins": ["react"], | |
"settings": { | |
"react": { | |
"createClass": "createReactClass", | |
"pragma": "React", | |
"version": "16.0", | |
"flowVersion": "0.53" | |
} |