Skip to content

Instantly share code, notes, and snippets.

💭
¯\_(ツ)_/¯

Andrew M. r3nya

View GitHub Profile
@r3nya
r3nya / README.md
Created Sep 27, 2016 — forked from addyosmani/README.md
108 byte CSS Layout Debugger
View README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

View example-nginx.conf
server {
server_name example.com www.example.com;
root /var/www/pub;
}
server {
server_name ~^(.*)\.example\.com$ ;
root /var/www/pub/$1;
}
@r3nya
r3nya / .gitlab-ci.yml
Created May 11, 2016
Simple config for gitlab ci
View .gitlab-ci.yml
variables:
COMMON_DIRECTOTY: /var/www/frontend
STATIC_DIRECTORY: $COMMON_DIRECTOTY/static
before_script:
- npm set progress=false
- npm install --silent
stages:
- build
View stylelint.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View gitconfig
[alias]
st = status --short --branch
last = log --numstat -1
aa = add --all
bv = branch -vv
ba = branch -ra
filelog = log -u
fl = log -u
grep = grep -Ii
gr = grep -Ii
View gulpfile.js
var runSequence = require('run-sequence');
gulp.task('some-task', function() {
runSequence(
['task-1', 'task-2', 'task-3'], // These 3 can be done in parallel
'task-4', // ...then just do this
['task-5', 'task-5'], // ...then do these things in parallel
'task-6', // ...then do this
// ....
);
View .babelrc
{
"presets": ["react", "es2015", "stage-0"],
"plugins": ["transform-decorators-legacy"],
"env": {
"development": {
"presets": ["react-hmre"]
}
}
}
View Fullscreen.js
import React, { PropTypes, Component, cloneElement, Children } from 'react';
import classNames from 'classnames';
import styles from './Fullscreen.scss';
export default class Fullscreen extends Component {
static propTypes = {
children: PropTypes.node,
scroll: PropTypes.boolean
};
View fullscreen.js
import React, { PropTypes, Component, cloneElement, Children } from 'react';
const window = window;
export default class Fullscreen extends Component {
constructor(props) {
super(props);
this.state = this.getDimensions();
}
View vim.md

Config

" Auto install vim-plug
if empty(glob("~/.vim/autoload/plug.vim"))
  execute '!curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.github.com/junegunn/vim-plug/master/plug.vim'
endif

" Plugins
call plug#begin('~/.vim/plugged')
You can’t perform that action at this time.