Skip to content

Instantly share code, notes, and snippets.

View epegzz's full-sized avatar
🤗

Daniel Schäfer epegzz

🤗
View GitHub Profile
@epegzz
epegzz / Monaco_Linux-Powerline.ttf
Created January 18, 2012 17:19
Monaco for vim-powerline
@epegzz
epegzz / MyComponent.js
Last active October 22, 2017 19:10
CSS inline styles, CSS Modules, ReactRouter 2
import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import styles from './MyComponent.scss';
function MyComponent(props, context) {
return (
<div className="my-component-container">
<h1 className="my-component-title">Hello, world!</h1>
<div className="my-component-body">
Here goes some more text…
@epegzz
epegzz / MyComponent.css
Created October 22, 2017 18:00
CSS inline styles, CSS Modules, ReactRouter 2
.my-component-container { padding: 10px; }
.my-component-title { color: "red"; font-size: 24px; }
.my-component-body { font-size: 15px; }
@epegzz
epegzz / MyComponent.js
Last active October 22, 2017 11:34
CSS inline styles, CSS Modules, ReactRouter 2
import React from 'react';
import withStyles from 'isomorphic-style-loader/lib/withStyles';
import styles from './MyComponent.scss';
function MyComponent(props, context) {
return (
<div className={styles.container}>
<h1 className={styles.title}>Hello, world!</h1>
<div className={styles.body}>
Here goes some more text…
@epegzz
epegzz / server.js
Last active October 22, 2017 11:28
CSS inline styles, CSS Modules, ReactRouter 2
import express from 'express';
import ReactDOM from 'react-dom';
import router from './router.js';
const server = express();
// Server-side rendering of the React app
server.get('*', (req, res, next) => {
const css = new Set();
// The context.insertCss() function will be called by `withStyles`
@epegzz
epegzz / MyComponent.css
Last active October 22, 2017 11:20
CSS inline styles, CSS Modules, ReactRouter 2
.container { padding: 10px; }
.title { color: "red"; font-size: 24px; }
.body { font-size: 15px; }
I have marked with a * those which I think are absolutely essential
Items for each section are sorted by oldest to newest. Come back soon for more!
BASH
* In bash, 'ctrl-r' searches your command history as you type
- Input from the commandline as if it were a file by replacing
'command < file.in' with 'command <<< "some input text"'
- '^' is a sed-like operator to replace chars from last command
'ls docs; ^docs^web^' is equal to 'ls web'. The second argument can be empty.
* '!!:n' selects the nth argument of the last command, and '!$' the last arg