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
<img style="max-width:100%; box-sizing:border-box;" src="https://media2.giphy.com/media/iLM4h2qLVS7qo/giphy.gif" width="300"/> |
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
curl -H "Content-Type: application/json" -X POST -d '{"src":"https://media2.giphy.com/media/iLM4h2qLVS7qo/giphy.gif","width":"300"}' http://localhost:3000/resolve |
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
window.opener.postMessage({ | |
method: 'done', | |
payload: { | |
/* Arbitrary serializable configuration data */ | |
} | |
}, 'https://app.mixmax.com'); |
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": "Giphy", | |
"author": "Mixmax Inc", | |
"url": "https://mixmax.com", | |
"appTray": { | |
"name": "Giphy", | |
"icon": "public/img/logo_giphy.png", | |
"editor": "http://yourdomain.com/editor", | |
"resolver": "http://yourdomain.com/resolver" | |
} |
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
<script> | |
new MixmaxSDK($('.emailer'), { | |
message: 'Come work on an exciting platform!' | |
}).render(); | |
</script> |
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
npm install -g modulus | |
# Redirect to CDN. | |
echo "WebAppInternals.setBundledJsCssPrefix('https://d14ym0a63kner.cloudfront.net/${GITSHA}');" > server/cdn.js | |
# This script is a hack to upload static assets generated by the "modulus deploy" command to our | |
# CDN, Amazon Cloudfront. This script should be run in the background prior to "modulus deploy" | |
# being called. It watches for a file named ./demeteorized/programs/web.browser/program.json to be | |
# created, then it uses gulp to upload assets to S3. | |
( |
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
// Disconnect Meteor when the tab is in the background. | |
document.addEventListener('visibilitychange', function() { | |
if (document.hidden) { | |
Meteor.disconnect(); | |
} else { | |
Meteor.reconnect(); | |
} | |
}); |
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
# Add git shell autocompletion | |
GIT_PS1_SHOWDIRTYSTATE=1 | |
source ~/.git-completion.bash | |
export PS1='\[\e[1G\e[0;36m\]\u: \W$(__git_ps1 " (%s)")\[\e[m\] ' |
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
<!doctype html> | |
<html> | |
<head> | |
<script src="script.js"></script> | |
</head> | |
<body> | |
<button id="hello">Hello</button> | |
</body> | |
</html> |
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 fib(n) { | |
return function(n, a, b) { | |
return n > 0 ? arguments.callee(n - 1, b, a + b) : a; | |
}(n, 0, 1); | |
} |