Skip to content

Instantly share code, notes, and snippets.

View xtuc's full-sized avatar

Sven Sauleau xtuc

View GitHub Profile
@xtuc
xtuc / ci
Created July 1, 2020 09:46
Ignoring the npm error class
::error file=./m/MaterialDesign-Webfont.json,line=1,col=1::unknown field licenses
::error file=./m/material-datetime-picker.json,line=1,col=1::unknown field authors
::error file=./m/meyer-reset.json,line=1,col=1::.autoupdate should not be null. Package will never auto-update
::error file=./m/meyer-reset.json,line=1,col=1::Unsupported .repository.type:
::error file=./m/mogl.json,line=1,col=1::unknown field authors
::error file=./m/midi.js.json,line=1,col=1::.autoupdate should not be null. Package will never auto-update
::error file=./m/moment.js.json,line=1,col=1::unknown field namespace
::error file=./m/markdown.js.json,line=1,col=1::unknown field authors
::error file=./m/mootools-more.json,line=1,col=1::.autoupdate should not be null. Package will never auto-update
::error file=./m/min.json,line=1,col=1::unknown field authors
@xtuc
xtuc / test-oob.cpp
Last active January 25, 2019 16:05
Test memory bound checks vs guard pages
#include <iostream>
#include <sys/mman.h>
#include <chrono>
#define CHECK(b) \
do { \
if (!(b)) { \
fprintf(stderr, #b": incorrect assertion.\n"); \
abort(); \
} \
@xtuc
xtuc / test.js
Created September 5, 2017 12:09
const {Layer, Network} = require('synaptic');
const inputLayer = new Layer(2);
const hiddenLayer = new Layer(3);
const outputLayer = new Layer(1);
inputLayer.project(hiddenLayer);
hiddenLayer.project(outputLayer);
const myNetwork = new Network({
input: inputLayer,
import {asyncReactor} from 'async-reactor';
import pEvent from 'p-event';
function Loader() {
return (
<div className='container'>
<div className='box'>
<h1>Please mouseover me!</h1>
</div>
export default function ({file}) {
  let plugins = [];

  if (file === 'main.js') {
    plugins.push('transform-remove-console');
  }

  return {
 presets: ['es2015'],
const presets = ['react', 'es2015'];
export const development = {
presets,
};
export const production = {
presets,
plugins: ['transform-remove-console'],
};
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super e
@xtuc
xtuc / Babel.md
Last active April 17, 2019 04:43

Path

remove

Removes the current path.

Example

Visistor:

@xtuc
xtuc / foo.js
Last active February 7, 2017 14:38
type Args = {
a: number,
b: number,
c: number,
};
function add({ a, b, c }: Args) {
return a + b + c;
}
public class Test {
public static void main(String[] args) {
System.out.println(104);
}
}