This file contains hidden or 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
| const spawn = require("child_process").spawn; | |
| const KEEP_AT_LEAST = 2; | |
| const CONTAINER_REGISTRIES = [ | |
| "gcr.io/<your project name>", | |
| "eu.gcr.io/<your project name>/gcf/europe-west3" | |
| ]; | |
| async function go(registry) { | |
| console.log(`> ${registry}`); |
This file contains hidden or 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
| const useState = React.useState; | |
| const App = function () { | |
| const [ count, change ] = useState(0); | |
| console.log(`count is: ${ count }`); | |
| return ( | |
| <section> | |
| <h1>Counter: { count }</h1> | |
| <button onClick={ () => change(count + 1) }> | |
| Click me |
This file contains hidden or 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
| var http = require('http'); | |
| var getTime = function() { | |
| var d = new Date(); | |
| return d.getHours() + ':' + d.getMinutes() + ':' + | |
| d.getSeconds() + ':' + d.getMilliseconds(); | |
| } | |
| var respond = function(res, str) { | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end(str + '\n'); | |
| console.log(str + ' ' + getTime()); |
This file contains hidden or 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
| var Base = require('./Base'); | |
| module.exports = Base.extend({ | |
| }); |
This file contains hidden or 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
| var filterTextArea = function(text) { | |
| text = text.replace(/(<([^>]+)>)/ig, ''); | |
| var re = /(?:https?:\/\/)?(?:www\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=)?([\w\-]{10,12})(?:&feature)?(?:[\w\-]{0})?/g; | |
| var iframe = '<iframe width="640" height="360" src="http://www.youtube.com/embed/$1" frameborder="0" allowfullscreen></iframe>'; | |
| text = iframe.replace('$1', text.split(re)[1]); | |
| return text; | |
| }; |
This file contains hidden or 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
| var Dispatcher = function(componentName) { | |
| var listeners = []; | |
| return { | |
| on: function(eventName, callback) { | |
| if(!listeners[eventName]) { | |
| listeners[eventName] = []; | |
| } | |
| listeners[eventName].push(callback); | |
| return this; | |
| }, |
This file contains hidden or 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
| var console = {log: function(o) { $.writeln(o); }} | |
| var Action = { | |
| applyAction: function(o, layerKind, callback) { | |
| if(o.typename == "LayerSet") { | |
| var layers = o.layers; | |
| for(var i=0; i<layers.length; i++) { | |
| this.applyAction(layers[i], layerKind, callback) | |
| } | |
| } else { |
This file contains hidden or 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
| @keyframes blink { | |
| 0% { opacity: 1; } | |
| 12% { opacity: 0.75; } | |
| 24% { opacity: 0.5; } | |
| 36% { opacity: 0.25; } | |
| 48% { opacity: 0; } | |
| 60% { opacity: 0.25; } | |
| 72% { opacity: 0.5; } | |
| 84% { opacity: 0.75; } | |
| 100% { opacity: 1; } |
This file contains hidden or 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
| var element = { | |
| el: $("<div></div>"), | |
| appended: [], | |
| listeners: {}, | |
| init: function() { | |
| return this; | |
| }, | |
| onAppend: function() { | |
| return this; | |
| }, |
NewerOlder