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 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'); | |
} | |
} |
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
name = Custom Pages Module | |
description = Provides routes and pages with custom themes. | |
core = 7.x |
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
#!/bin/bash | |
path=$1 | |
for file in $1/*; do | |
echo $file | |
filename=$(basename "$file" .mov) | |
filename=${filename//-/:} | |
filename=${filename//;/:} | |
echo "$filename" |
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 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 |
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 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; |
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
// Fibonacci | |
//Looping | |
// seeds are 0,1,0 or 1,0,1 | |
console.log("Looping : \n"); | |
var result = 0, | |
term1 = 1, | |
term2 = 0; |
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'; | |
// 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) { |
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
Show hidden characters
{ | |
"extends": "standard", | |
"rules": { | |
"semi": [2, "always"], | |
"no-extra-semi": 2 | |
} | |
} |
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
{ | |
"extends": "semistandard", | |
"plugins": ["react"], | |
"settings": { | |
"react": { | |
"createClass": "createReactClass", | |
"pragma": "React", | |
"version": "16.0", | |
"flowVersion": "0.53" | |
} |
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
"eslintConfig": { | |
"extends": "standard", | |
"env": { | |
"node": true | |
}, | |
"rules": { | |
"semi": [ | |
2, | |
"always" | |
], |
OlderNewer