This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mongojs = require('mongojs') | |
| const fs = require('fs'); | |
| const db = mongojs('moprop') | |
| var list = []; | |
| // test connection | |
| db.properties.find({}, (e, r) => { }) | |
| db.on('error', function (err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const testFolder = 'export'; | |
| const mongojs = require('mongojs') | |
| var list = []; | |
| const db = mongojs('moprop'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare module 'react-custom-scroll' { | |
| interface Props { | |
| allowOuterScroll?: boolean; | |
| heightRelativeToParent?: string; | |
| flex?: number | string; | |
| onScoll?: (e?: any) => any | |
| addScrolledClass?: boolean; | |
| freezePosition?: boolean; | |
| minScrollHandleHeight?: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| declare module 'styled-components' { | |
| // Type definitions for styled-components 4.1 | |
| // Project: https://github.com/styled-components/styled-components | |
| // Definitions by: Igor Oleinikov <https://github.com/Igorbek> | |
| // Ihor Chulinda <https://github.com/Igmat> | |
| // Adam Lavin <https://github.com/lavoaster> | |
| // Jessica Franco <https://github.com/Kovensky> | |
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
| // TypeScript Version: 2.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //https://www.arduino.cc/en/Tutorial/MasterWriter | |
| //https://github.com/PaulStoffregen/RadioHead | |
| #include <Wire.h> | |
| //setup | |
| const int currentPin = A0; | |
| //config | |
| float AC_voltage = 230.0; //volts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // node.js : Mailgun via API | |
| var request = require('request') | |
| var apiBaseUrl = 'https://api.mailgun.net/v3/sandboxXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.mailgun.org'; | |
| var apiKey = 'key-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'; | |
| var from = 'Excited User'; | |
| var to = 'example@example.com'; | |
| var subject = 'Hello'; | |
| var text = 'Testing some Mailgun awesomness!'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Copyright 2012 Akseli Palén. | |
| * Created 2012-07-15. | |
| * Licensed under the MIT license. | |
| * | |
| * <license> | |
| * Permission is hereby granted, free of charge, to any person obtaining | |
| * a copy of this software and associated documentation files | |
| * (the "Software"), to deal in the Software without restriction, | |
| * including without limitation the rights to use, copy, modify, merge, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // PID control function. | |
| // | |
| // USAGE | |
| // inputTemperature - latest sensor reading | |
| // targetTemperature - what temperature you want to achieve | |
| // timedelta - seconds since last call. this can be fractions of a second. | |
| // | |
| // double calcPID(double inputTemperature, double targetTemperature, double timedelta) | |
| // | |
| // eg.: double temperatureControl = calcPID(125.1, 180.0, 0.12); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # rouan van der ende - fluentart.com | |
| # loads obj, renders, deletes the obj, next frame. | |
| import bpy | |
| import os | |
| import bpy, random | |
| import threading, time | |
| import io_scene_obj.import_obj | |
| from mathutils import Vector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var http = require("http"); | |
| var fs = require("fs"); | |
| var s = http.createServer(function(req, res) { | |
| fs.readFile("./" + req.url, function(error, data) { | |
| if (error) { | |
| res.writeHead(404, { 'content-type': 'text-plain' }); | |
| res.end("The page is not found!"); | |
| } | |
| else { |
NewerOlder