Skip to content

Instantly share code, notes, and snippets.

Avatar
👋
while(1 < 2) { aG.work(); }

Allen Gammel intolerance

👋
while(1 < 2) { aG.work(); }
View GitHub Profile
View paperless-swagger.json
{
"openapi" : "3.0.0",
"info" : {
"description" : "This API is used to interact with SyteLine",
"version" : "1.0.4-oas3",
"title" : "Paperless Manufacturing",
"contact" : {
"email" : "allen.gammel@mail.weir"
},
"license" : {
@intolerance
intolerance / findScrollTopGreaterThanZero.js
Last active Nov 6, 2019
Finds an element whos ScrollTop is greater than 0
View findScrollTopGreaterThanZero.js
var all = document.getElementsByTagName("*"), i = 0;
for (; i < all.length; i++) {
if (all[i].scrollTop !== 0 ){
console.log(all[i]);
}
}
View db-swagger.json
{
"swagger": "2.0",
"info": {
"description": "This is for a mongo API\n",
"version": "1.0.1",
"title": "MongoPaperless",
"contact": {
"email": "taylor.fry@mail.weir"
},
"license": {
@intolerance
intolerance / deviceModal.json
Last active Sep 12, 2019
Device Modal mock data
View deviceModal.json
{
"uid": "462-1000",
"name": "4900",
"manufacturer": "OKUMA",
"model": "MA600",
"building": "A",
"cell": "INTBODIES",
"location": "Fort Worth",
"coords": {},
"businessUnit": "Pressure Pumping",
@intolerance
intolerance / MongoRemoveDupes.js
Last active Nov 6, 2019
Finds and remove duplicates from MongoDB without aggregation
View MongoRemoveDupes.js
const devs = {};
Device.find({}, (err, devices) => {
devices.forEach((device) => {
if (!devs || !devs[device.uid]) {
devs[device.uid] = [];
}
devs[device.uid].push(device);
});
const dupesOnly = {};
@intolerance
intolerance / netmask.js
Last active Oct 17, 2018
Netmask for IP traversing
View netmask.js
import { Netmask } from 'netmask';
const block = new Netmask('192.168.150.0/21'); // 21 === 255.255.248.0 subnet
console.log(block.mask);
block.forEach(comp => {
console.log(comp);
});
You can’t perform that action at this time.