Skip to content

Instantly share code, notes, and snippets.

View darkwebdev's full-sized avatar

Timur Manyanov darkwebdev

  • eBay
  • Berlin, Germany
View GitHub Profile
@darkwebdev
darkwebdev / args.js
Last active September 13, 2019 13:09
Convert script arguments to an object (ES6)
const longArgs = arg => {
const [ key, value ] = arg.split('=');
return { [key.slice(2)]: value || true }
};
const flags = arg => [...arg.slice(1)].reduce((flagObj, f) => ({ ...flagObj, [f]: true }), {});
module.exports = () =>
process.argv
.slice(2)
module.exports = (...args) =>
args.reduce((instance, arg) => ({
...instance,
[arg]: Symbol(arg)
}), {})
@darkwebdev
darkwebdev / SassMeister-input.scss
Created July 31, 2014 11:45
Generated by SassMeister.com.
// ----
// Sass (v3.3.12)
// Compass (v1.0.0.alpha.21)
// ----
.class1 {
color: red;
}
.class2 {
font-size: 16px;
@darkwebdev
darkwebdev / gist:8333886
Created January 9, 2014 13:10
CSS (generated from SCSS) from debug version of Kinofé client. All comments removed.
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
@darkwebdev
darkwebdev / gist:8333799
Last active January 2, 2016 16:59
HTML code (generated from Jade templates) from debug version of Kinofé client. Scripts are not concatenated together and dynamically injected inline styles exist.
<!DOCTYPE html>
<!--[if lt IE 8]>
<html class="no-js lt-ie9 lt-ie8">
<![endif]-->
<!--[if IE 8]>
<html class="no-js lt-ie9">
<![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js">
<!--<![endif]-->