Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096
import * as models from "models"; | |
import Sequelize from "sequelize"; | |
import fs from "fs"; | |
delete models.default; | |
const sequelize = new Sequelize( | |
'', | |
'', | |
'', { |
import { h, Component } from 'preact'; | |
/** Creates a new store, which is a tiny evented state container. | |
* @example | |
* let store = createStore(); | |
* store.subscribe( state => console.log(state) ); | |
* store.setState({ a: 'b' }); // logs { a: 'b' } | |
* store.setState({ c: 'd' }); // logs { c: 'd' } | |
*/ |
import React, { Component } from 'react' | |
import { Link } from 'react-router' | |
// Drag and Drop | |
import { DragDropContext } from 'react-dnd' | |
import HTML5Backend from 'react-dnd-html5-backend' | |
// Material UI | |
import { List } from 'material-ui/List' | |
import Subheader from 'material-ui/Subheader' | |
class ReorderableList extends Component { |
""" | |
example: The following JSON document: | |
{"maps":[{"id1":"blabla","iscategorical1":"0", "perro":[{"dog1": "1", "dog2": "2"}]},{"id2":"blabla","iscategorical2":"0"}], | |
"masks":{"id":"valore"}, | |
"om_points":"value", | |
"parameters":{"id":"valore"}} | |
will have the following output: | |
{'masks.id': 'valore', 'maps.iscategorical2': '0', 'om_points': 'value', 'maps.iscategorical1': '0', | |
'maps.id1': 'blabla', 'parameters.id': 'valore', 'maps.perro.dog2': '2', 'maps.perro.dog1': '1', 'maps.id2': 'blabla'} |
One of my favorite things about Vue.js is how approachable it is. We can simply drop the library into an existing project, create a Vue
instance with an element or ID of our choosing as a selector, and we're all set to add reactivity to the page. This simplicity is great and comes in handy if we just want to use a few of Vue's features, but there's actually a lot more we can do with the library that some people may not be aware of.
Surrounding the core Vue.js library is a rich ecosystem of tools and plugins that allow us to create full single page applications. Vue also offers full support for ES2015 and comes with its own file type: the .vue
component, which is great because it allows us to have our template, scripts, and styles all in the same file. While some might say that this could be cumbersome and file sizes could get huge, I would argue that the number of clicks and amount of mental bandwidth (even if small) that we save by using this kind of format makes it quite valuable.
This is the secon
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
This sets up Atom to properly lint ES6+Babel+JSX using Airbnb's .eslintrc as a starting point.
npm i -D eslint eslint-config-airbnb babel-eslint eslint-plugin-babel eslint-plugin-react eslint-plugin-react-native eslint-plugin-import eslint-plugin-jsx-a11y
from your project root."extends": "airbnb"
to your .eslintrc and "plugins": [ "babel", "react", "react-native", "jsx-a11y" ]
apm install linter-eslint
this also installs linter
which clashes with nuclide diagnostics<?php | |
/* | |
Updated version, 2016-12-02: fixed shellcode so it *actually* works on QEMU | |
usermode emulation (seems I pushed an old version), and removed debug output. | |
------------------------- | |
NB: THIS PoC ONLY WORKS IN QEMU USERMODE EMULATION! | |
If anyone wants to fix this, go ahead (no pun intended). | |
However, I don't have a vulnerable product and am unwilling to acquire one. |
import React, {PropTypes} from 'react'; | |
import cx from 'classnames'; | |
import cs from './Text.scss'; | |
/** | |
* Material-UI doesn't expose the Material Design typography in the | |
* current stable version, but the upcoming major version does so | |
* (https://github.com/callemall/material-ui/blob/next/src/Text/Text.js). | |
* As the upcoming relase is currently in alpha version, this | |
* component is back-ported so its API can already be used. |