Skip to content

Instantly share code, notes, and snippets.

View arunoda's full-sized avatar
👨‍🍳
Cooking something new

Arunoda Susiripala arunoda

👨‍🍳
Cooking something new
View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class InfiniteMovingBelt : MonoBehaviour
{
public GameObject item;
public float speed = -1f;
public float spawnOffsetFromScreen = 1f;
public float destroyOffsetFromScreen = 1f;
@arunoda
arunoda / README.md
Created November 16, 2017 16:30
Result: ESP 8266 Load Test
@arunoda
arunoda / client.js
Created November 16, 2017 11:47
Node.js HTTP client for ESP8266 Load Test
const http = require('http');
const printHeaders = (() => {
let printed = false
return () => {
if (printed) return
console.log('timestamp, kbps')
printed = true;
}
})();
{
"scripts": {
"dev": "next",
"build": "next build",
"export": "next export"
}
}
@arunoda
arunoda / next.config.js
Created May 3, 2017 16:52
Stop uglifying in Next.js
module.exports = {
webpack: function (cfg) {
cfg.plugins = cfg.plugins.filter(plugin => {
return plugin.constructor.name !== 'UglifyJsPlugin';
});
return plugin
}
}
const express = require('express')
const next = require('next')
const dev = process.env.NODE_ENV !== 'production'
const app = next({ dev })
const handle = app.getRequestHandler()
app.prepare()
.then(() => {
const server = express()
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _defineProperty2 = require("/data/zeit/next.js/node_modules/babel-runtime/helpers/defineProperty");
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
SysInfoComponent.fragment = SysInfoSchema.createFragment(`
fragment on SysInfo {
hostname,
memory,
uptime,
loadavg {
min1
}
}
`);
SysInfoComponent = ({sysInfo}) => (
<div>
<h1>System Information</h1>
<ul>
<li>Hostname: {sysInfo.hostname}</li>
<li>Uptime: {sysInfo.uptime} seconds</li>
<li>Memory: {sysInfo.memory} MB</li>
<li>Load Average: {sysInfo.loadavg.min1} </li>
</ul>
</div>
{
sysInfo {
memory,
uptime,
loadavg {
min1
}
}
}