Skip to content

Instantly share code, notes, and snippets.

View abelaska's full-sized avatar
👍

Alois Bělaška abelaska

👍
View GitHub Profile
@abelaska
abelaska / gist:9c9eda70d31315f27a564be2ee490cf4
Created September 9, 2016 08:57
CSS Roboto Embedded Font Base64 encoded
/* 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
@abelaska
abelaska / gist:6a4d8d4da37595e03303e666090f76d9
Created August 31, 2016 07:23
Primitive inline styling
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);
@abelaska
abelaska / gist:b1a4f7eb40b17584a119
Created November 5, 2015 16:36
Trying to use react-toolbox in isomorphic app
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)
#!/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