Skip to content

Instantly share code, notes, and snippets.

@IvanaSays
IvanaSays / PerformantAnimations3.css
Last active August 9, 2017 12:37
3 - Performant Animations
.menu {
opacity: 1;
transition: .2s;
}
.menu.closed {
opacity: 0;
pointer-events: none;
}
@IvanaSays
IvanaSays / PerformantAnimations2.css
Last active August 9, 2017 12:35
2 - Performant Animations
.box {
transform: translateX(10px);
position: absolute;
transition: .2s;
&.active {
transform: translateX(0px);
}
}
@IvanaSays
IvanaSays / PerformantAnimations1.css
Last active August 9, 2017 12:35
1 - Performant Animations
.box {
left: 10px;
position: absolute;
transition: .2s;
&.active {
left: 0px;
}
}
@IvanaSays
IvanaSays / alexa_sdk_exports.js
Last active August 3, 2017 13:09
alexa_sdk_exports.js
exports.handler = function(event, context, callback) {
var alexa = Alexa.handler(event, context);
alexa.appId = appId;
alexa.dynamoDBTableName = dynamoDBTableName;
alexa.registerHandlers(newSessionHandlers, getRulesHandlers);
alexa.execute();
}
int sum = 0
for i in my_array {
sum += i
}
//sum contains the sum of all elements
index.searchForFacetValues({
query: "twilio",
facetName: "Title",
facetQuery: "director"
})
index.searchForFacetValues({
query: "twilio",
facetName: "Title",
facetQuery: "director"
})
{
"Name": "Jeff Lawson",
"Title": "CEO",
"Company": "Twilio Inc",
"Location": "San Francisco"
}
@IvanaSays
IvanaSays / gist:ebb22dea21486cf9ad38529233a7db4d
Created July 19, 2017 15:14
Inside the Search Engine - Nico B.
index.searchForFacetValues({
query: "twilio",
facetName: "Title",
facetQuery: "director"
})