Skip to content

Instantly share code, notes, and snippets.

Avatar

Yosevu Kilonzo yosevu

View GitHub Profile
@yosevu
yosevu / metadata.json
Created Jun 4, 2022
Marlowe in depth 2
View metadata.json
{"valueParameterInfo":[["Amount",{"valueParameterFormat":{"contents":[6,"ada"],"tag":"DecimalFormat"},"valueParameterDescription":""}]],"slotParameterDescriptions":[["DepositDeadline","Deadline for the deposit"],["ChoiceDeadline","Deadline for the choice"]],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"Giver makes a payment to receiver","contractName":"MPP - Simple payment (Close)","contractLongDescription":"Giver makes a payment to receiver","choiceInfo":[]}
View metadata.json
{"valueParameterInfo":[],"slotParameterDescriptions":[],"roleDescriptions":[],"contractType":"Other","contractShortDescription":"","contractName":"","contractLongDescription":"","choiceInfo":[]}
View machine.js
const lightBulbMachine = Machine({
id: 'lightBulb',
initial: 'unlit',
states: {
lit: {
on: {
BREAK: 'broken',
TOGGLE: 'unlit',
},
},
View disney-quotes.txt
“The flower that blooms in adversity is the most rare and beautiful of all” – Mulan
“All it takes is faith and trust”– Peter Pan
“The past can hurt. But the way I see it, you can either run from it or learn from it” – The Lion King
“Today is a good day to try” – The Hunchback of Notre Dame
“Just because it’s what’s done, doesn’t mean it’s what should be done” – Cinderella
“Some people are worth melting for” – Frozen
“The only way to get what you want in this world is through hard work” – The Princess and the Frog
“Can anybody be happy if they aren’t free?” – Beauty and the Beast
“The only thing predictable about life is its unpredictability” – Ratatouille
“Remember who you are” – The Lion King
@yosevu
yosevu / getNumberOfStars.js
Last active Jan 28, 2020
getNumberOfStars
View getNumberOfStars.js
// Fixtures
const FILLED_STAR = '<filled/>';
const EMPTY_STAR = '<empty/>';
const MAX_STARS = 5;
const numberOfStars = 3;
// Version 1
R.join('',
R.concat(
View lint-heat-map.txt
30:3 error Unexpected let, use const instead functional/no-let
30:7 error 'calendarData' is never reassigned. Use 'const' instead prefer-const
31:3 error Unexpected let, use const instead functional/no-let
33:3 error Unexpected loop, use map or reduce instead functional/no-loop-statement
34:5 error Using expressions to cause side-effects not allowed functional/no-expression-statement
34:5 error Modifying an existing object/array is not allowed functional/immutable-data
35:5 error Using expressions to cause side-effects not allowed functional/no-expression-statement
38:3 error Unexpected loop, use map or reduce instead functional/no-loop-statement
38:8 error Unexpected let, use const instead functional/no-let
39
View git-checkout-escape-wildcard.txt
git checkout -- 'packages/**/package-lock.json'
View transformStyle.js
const getSelectedOptions = facet => {
const options = get(
facet,
'searchFacetOptionGroupList.searchFacetOptionList'
);
const isActiveAndSelected = option =>
option.isActive === 'true' && option.isSelected === 'true';
return filter(options, isActiveAndSelected);
};
View transform-style.js
// transformStyle :: Object -> Object
const transformStyle = facet => {
result.facetSelected.style = [];
facetOptions.style = facet;
facetOptions.style.searchFacetName = 'Category';
facetOptions.style.facetType = 'multi-select';
facetOptions.style.facetLayout = 'list';
@yosevu
yosevu / checkbox.scss
Last active Jun 12, 2019
left-facet checkbox styles #gap
View checkbox.scss
.checkbox {
@extend .sds_checkbox-a;
&__input {
@extend .sds_checkbox-a__input;
}
&__box {
@extend .sds_checkbox-a__box;
}