Let Google cache and resize your images.
Resized and Cached:
Original:
| #!/bin/bash | |
| set -e | |
| # SET HOSTNAME | |
| oldname=$(hostname) | |
| hostname "$1" | |
| sed -i -e s/$oldname/"$1"/g /etc/hosts | |
| sed -i -e s/$oldname/"$1"/g /etc/sysconfig/network |
| Tring to integrate react-toolbox into https://github.com/este/este I am getting this error: | |
| /home/abelaska/Projects/ten-app/node_modules/react-transform-hmr/lib/index.js:51 | |
| throw new Error('locals[0] does not appear to be a `module` object with Hot Module ' + 'replacement API enabled. You should disable react-transform-hmr in ' + 'production by using `env` section in Babel configuration. See the ' + 'example in README: https://github.com/gaearon/react-transform-hmr'); | |
| ^ | |
| Error: locals[0] does not appear to be a `module` object with Hot Module replacement API enabled. You should disable react-transform-hmr in production by using `env` section in Babel configuration. See the example in README: https://github.com/gaearon/react-transform-hmr | |
| at proxyReactComponents (/home/abelaska/Projects/ten-app/node_modules/react-transform-hmr/lib/index.js:51:11) | |
| at Object.<anonymous> (/home/abelaska/Projects/ten-app/node_modules/react-toolbox/lib/input/index.js:47:65) | |
| at Module._compile (module.js:435:26) |
| const compileStyles = defaultStyles => (...stylePaths) => { | |
| const styles = stylePaths.map(stylePath => { | |
| const path = `${stylePath}.style` | |
| const style = get(defaultStyles, path); | |
| if (!style) { | |
| throw new Error(`Style path ${path} not found`); | |
| } | |
| return style; | |
| }); | |
| return Object.assign({}, ...styles); |
| /* https://fonts.google.com/specimen/Roboto?selection.family=Roboto:300,400,500,700 https://www.fontsquirrel.com/tools/webfont-generator */ | |
| @font-face { | |
| font-family: 'Roboto'; | |
| font-style: normal; | |
| font-weight: 300; | |
| src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGSwABMAAAAAtfwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABqAAAABwAAAAcZSXU3EdERUYAAAHEAAAAlQAAAOYXGhVYR1BPUwAAAlwAAAdrAAAQ5noXPxxHU1VCAAAJyAAAATQAAAKy3SOq409TLzIAAAr8AAAAUwAAAGCgNqyhY21hcAAAC1AAAAGPAAAB6gODigBjdnQgAAAM4AAAAEIAAABCEToKw2ZwZ20AAA0kAAABsQAAAmVTtC+nZ2FzcAAADtgAAAAIAAAACAAAABBnbHlmAAAO4AAATFsAAIy8VrEAaGhlYWQAAFs8AAAAMwAAADYN24w7aGhlYQAAW3AAAAAgAAAAJA8tBb1obXR4AABbkAAAAnoAAAOqnWlWT2xvY2EAAF4MAAAByQAAAdgbwD2ObWF4cAAAX9gAAAAgAAAAIAIIAaduYW1lAABf+AAAAc0AAAPGOTyS+XBvc3QAAGHIAAAB8gAAAu/ZWLW+cHJlcAAAY7wAAADqAAABofgPHd13ZWJmAABkqAAAAAYAAAAGcF9X0gAAAAEAAAAAzD2izwAAAADE8BEuAAAAANP4IN542h3P2UoCYBBA4fP/eO1D+KiVCppaKC64laaCuaK44NqLdJngU3RqDgPfXA4BSLrf/E0kReDBfeTJK22BjEWy5HSeZ12gqEu86FfKukJV1yxQt0iDpm7R1h26+s0i7/R0nw89sMDQIiPG+p |
| try { | |
| await UserSession.get(ctx.id).update({ pingedAt: r.now() }, { durability: 'soft' }); | |
| } catch (e) { | |
| if (e.name === 'DocumentNotFoundError') { | |
| await UserSession | |
| .insert({ id: ctx.id, userId: ctx.user.id, pingedAt: r.now() }, { durability: 'soft' }); | |
| } else { | |
| log.error(`Failed to update user session ${ctx.id}`, { | |
| error: err | |
| }); |
| https://github.com/paralect/robomongo/issues/1106 |
| const show = ({ url }, resolve, reject) => { | |
| const width = Math.max(1000, Math.floor(window.outerWidth * 0.8)); | |
| const height = Math.max(630, Math.floor(window.outerHeight * 0.5)); | |
| const left = Math.floor(window.screenX + (window.outerWidth - width) / 2); | |
| const top = Math.floor(window.screenY + (window.outerHeight - height) / 8); | |
| const wOptions = [ | |
| 'toolbar=0', | |
| 'scrollbars=1', | |
| 'status=0', |
| // @flow | |
| /* global document */ | |
| export default ({ | |
| onCommit, | |
| maxLength = -1, | |
| state = {} | |
| }: { | |
| state?: { | |
| originalValue?: string |
Let Google cache and resize your images.
Resized and Cached:
Original:
I found it while poking around the Google+ HTML. Jotting down some notes felt like a good idea, so here goes. If you know more about this API, let me know, please!
(Word of warning: I spent ~30 minutes on both my experimentation and this here write-up, so it might not be the most thought-provoking, brilliant thing you read today.)