Skip to content

Instantly share code, notes, and snippets.

@Enalmada
Enalmada / server.js
Created Oct 2, 2018
Next.js http2 push test
View server.js
const express = require("express");
const next = require("next");
const expressHealthcheck = require("express-healthcheck");
const Sentry = require("@sentry/node");
const fs = require("fs");
const port = parseInt(process.env.PORT, 10) || 3000;
const dev = process.env.NODE_ENV !== "production";
const app = next({dev});
const handle = app.getRequestHandler();
@Enalmada
Enalmada / FontAwesomeIcon.re
Created Oct 4, 2018
reason-react bindings for Font Awesome 5
View FontAwesomeIcon.re
[@bs.module "@fortawesome/react-fontawesome"] external reactClass : ReasonReact.reactClass = "FontAwesomeIcon";
[@bs.obj]
external makeProps:
(
~icon: array(string),
~id: string=?,
~className: string=?,
~style: ReactDOMRe.Style.t=?,
unit
View spliterror.json
{"type":"li","props":{"className":"ant-menu-submenu ant-menu-submenu-horizontal ant-menu-overflowed-submenu","style":{"display":"none"},"children":[false,false,{"key":null,"ref":null,"props":{"prefixCls":"ant-menu-submenu","popupClassName":"ant-menu-submenu-popup ant-menu-light","builtinPlacements":{"topLeft":{"points":["bl","tl"],"overflow":{"adjustX":1,"adjustY":1},"offset":[0,-7]},"bottomLeft":{"points":["tl","bl"],"overflow":"~props~children~2~props~builtinPlacements~topLeft~overflow","offset":[0,7]},"leftTop":{"points":["tr","tl"],"overflow":"~props~children~2~props~builtinPlacements~topLeft~overflow","offset":[-4,0]},"rightTop":{"points":["tl","tr"],"overflow":"~props~children~2~props~builtinPlacements~topLeft~overflow","offset":[4,0]}},"popupPlacement":"bottomLeft","popupVisible":false,"popupAlign":{},"popup":{"type":"div","key":null,"ref":null,"props":{},"_owner":{"tag":1,"key":null,"stateNode":{"props":{"title":{"type":"span","key":null,"ref":null,"props":{"children":"···"},"_owner":null,"_store":{}}
@Enalmada
Enalmada / next.config.js
Last active Aug 9, 2019 — forked from delikat/next.config.js
Modular antd imports with next.js, next-less and babel-plugin-import
View next.config.js
const withLess = require('@zeit/next-less')
const resolve = require('resolve')
// styled jsx will fail without it
if (typeof require !== 'undefined') {
require.extensions['.less'] = (file) => {}
}
module.exports = withLess({
lessLoaderOptions: {
View turbolinks_prefetch.coffee
@Enalmada
Enalmada / jscroll.js
Created May 21, 2020
custom version to support multiple
View jscroll.js
/*!
* jScroll - jQuery Plugin for Infinite Scrolling / Auto-Paging
* @see @link{https://jscroll.com}
*
* @copyright Philip Klauzinski
* @license Dual licensed under the MIT and GPL Version 2 licenses
* @author Philip Klauzinski (https://webtopian.com)
* @version 2.4.1
* @requires jQuery v1.8.0+
* @preserve
View jscroll.js
/*!
* jScroll - jQuery Plugin for Infinite Scrolling / Auto-Paging
* @see @link{https://jscroll.com}
*
* @copyright Philip Klauzinski
* @license Dual licensed under the MIT and GPL Version 2 licenses
* @author Philip Klauzinski (https://webtopian.com)
* @version 2.4.1
* @requires jQuery v1.8.0+
* @preserve
@Enalmada
Enalmada / openOrderMonitor.js
Created Jan 12, 2021 — forked from codeninja/openOrderMonitor.js
Node JS Script to check Binance for open orders and notify when they are filled.
View openOrderMonitor.js
//this script will monitor for all pairs and find any open orders for that pair.
// I've done my best to account for throttling and make the script robust.
// save locally, add your api key, and run with "node <script name>" in console.
// You'll get alerted (in console) when an order fills.
// if you'd like to send a donation my way:
// BTC: 1JD595vphvXmWEwpjiUmfw3QzsBtE9jUP7
// LTC: LcaHE2dqrH73xLtoKXwDZEUtDiY42iAvk4
// ETH: 0x110191093ffab1f0d3d6012cc0de15f42257b7f6
// BNB: 0x110191093ffab1f0d3d6012cc0de15f42257b7f6
// codeninja@gmail.com for questions... I'll do my best to support the script if you find any bugs.
View gist:3e68169e1689d03e4412af23439932c6
# First, install all of the things
sudo su
apt-get update
apt-get install nginx
/etc/init.d/nginx start
apt-get install python-dev
apt-get install python-pip
apt-get install libjpeg-dev libpng-dev libtiff-dev libjasper-dev libgtk2.0-dev python-numpy python-pycurl libwebp-dev python-opencv libjpeg-progs
ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib