This file contains 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
// Constants | |
const TARGET_TEMPERATURE = 40; | |
const PUMP_INTERVAL = 10 * 1000; | |
const START_STOP_THRESHOLD = 1.0; | |
const WEATHER_STATION_ID = "1395"; | |
const HEATLOSS_RATE = 0.0158; | |
const HEATLOSS_RATE_COVER = 0.001206; | |
const INLET_FLOW_RATE = 2.2334; | |
const INLET_TEMPERATURE = 43; | |
const SPA_VOLUME = 1000; |
This file contains 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
/** | |
* BMW IBus Daemon reads BMW IBus data through serial port. It detects | |
* BMW board monitor(at least BM53) unit and steering wheel button presses | |
* from IBus data, maps them to key events and injects them to system event | |
* queue via uinput. | |
* | |
* It also can be configured to inject key events only in certain state like | |
* TAPE or AUX which can be useful if you want to hijack for example TAPE | |
* mode for other use. | |
* |
This file contains 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
import { ConnectionInformations, CreateUser, DatabaseInterface, Session } from '@accounts/types'; | |
import { Repository, getRepository } from 'typeorm'; | |
import { User } from '../entity/User'; | |
import { UserEmail } from '../entity/UserEmail'; | |
import { UserService } from '../entity/UserService'; | |
import { UserSession } from '../entity/UserSession'; | |
type ISession = Session & UserSession; | |
export class Typeorm implements DatabaseInterface { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
<?php | |
/** | |
* Twitter Bootstrap Kohana helper | |
* | |
* example of use: | |
* <?=Bootstrap::grid($grid, Bootstrap::FLUID);?> | |
* <?=$grid->span($view, 4);?> | |
* <?=Bootstrap::icon('download', TRUE);?> | |
* <?=Bootstrap::button('Button'); ?> |
This file contains 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
function Cube({ position }: { position?: number[] | THREE.Vector3 }) { | |
const mesh = useRef<THREE.Mesh>(); | |
const touched = useTouch(mesh); | |
return ( | |
<mesh ref={mesh} castShadow receiveShadow position={position}> | |
<boxGeometry attach="geometry" args={[1, 1, 1]} /> | |
<meshStandardMaterial | |
attach="material" | |
color={touched ? 0xff0000 : 0xffffff} |
This file contains 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
/** | |
* Arduino based "2-step launch control" | |
* Works by interrupt power signal to ignition coil. | |
* Requires RPM and Clutch signal | |
* | |
* @author Birkir Gudjonsson (birkir.gudjonsson@gmail.com) | |
* @licence http://en.wikipedia.org/wiki/BSD_licenses | |
*/ | |
// settings |
This file contains 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
/** | |
* Convert 7-bit ASCII to Chuck Norris style binary | |
* | |
* @param string Characters to encode | |
* @return string Binary' norris style. | |
*/ | |
function asciiToChuckNorris(chars) { | |
// Variables | |
var bits = [], |
This file contains 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
<?php | |
class ORM_Revision extends Kohana_ORM { | |
// revision table prefix (default _revision_) | |
protected $_revision_table_prefix = '_revision_'; | |
// are we going for draft or published | |
protected $_draft = FALSE; |
This file contains 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
/** | |
* This plugin will emit events with GPS coordinates | |
* | |
* const gps = new GPSPlugin(); | |
* gps.on('gps', ({ lat, lng, alt }) => console.log(lat, lng, alt)); | |
* MINI.addPlugin(gps); | |
*/ | |
class GPSPlugin { | |
/** |
NewerOlder