Skip to content

Instantly share code, notes, and snippets.

View r3nya's full-sized avatar
☮️
¯\_(ツ)_/¯

Andrew M. r3nya

☮️
¯\_(ツ)_/¯
View GitHub Profile
~ » ls -1 .vscode/extensions | awk -F'.' '{print $2}' | sed 's/\-[0-9]$//g'
EditorConfig
beautify
vscode-jest
emoji
ejs-language-support
sort-lines
html-snippets
Bookmarks
copy-relative-path
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' +
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' +
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' +
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));';
try {
eval(str);
} catch(e) {
alert('Your browser does not support ES6!')
}
@r3nya
r3nya / settings.json
Created January 30, 2017 22:26
Config for VSCode
// Place your settings in this file to overwrite the default settings
{
"editor.fontFamily": "Hack",
"editor.fontSize": 13,
"workbench.activityBar.visible": false,
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
@r3nya
r3nya / pre-commit.sh
Created November 18, 2016 14:22 — forked from dahjelle/pre-commit.sh
Pre-commit hook for eslint, linting *only* staged changes.
#!/bin/bash
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
do
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
fi
done
@r3nya
r3nya / README.md
Created September 27, 2016 18:34 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

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

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 06:21
Simple config for gitlab ci
variables:
COMMON_DIRECTOTY: /var/www/frontend
STATIC_DIRECTORY: $COMMON_DIRECTOTY/static
before_script:
- npm set progress=false
- npm install --silent
stages:
- build
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[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
@r3nya
r3nya / gulpfile.js
Created March 22, 2016 11:25
run-sequence
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
// ....
);