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
| from pynput import mouse | |
| from pynput.keyboard import Key, Controller | |
| import json | |
| with open('config.json', 'r') as f: | |
| config = json.load(f) | |
| keyboard = Controller() | |
| def on_scroll(x, y, dx, dy): |
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
| interface IdMappingDoc { | |
| firstId: string, | |
| secondId: string, | |
| } | |
| interface IdMappingConfig { | |
| sourceIdField: 'firstId' | 'secondId' | |
| targetIdField: 'firstId' | 'secondId' | |
| } |
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
| #!/usr/bin/env bash | |
| # Empty image that is used instead of the ✔. Needed for alignment. | |
| EMPTY_IMAGE="image='iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=' imageWidth=15" | |
| CODING_ICON="$EMPTY_IMAGE" | |
| NORMAL_ICON="$EMPTY_IMAGE" | |
| # You might need to change this line. It justs tests if keycode 34 is mapping to a braceleft which indicates that we are in coding keyboard mode. | |
| if xmodmap -pke | grep -q "keycode 34.*braceleft" | |
| then |
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
| import { Router } from '@angular/router'; | |
| import { AuthService } from './auth.service'; | |
| import { Injectable, NgZone } from '@angular/core'; | |
| import * as store from 'store'; | |
| const MINUTES_UNITL_AUTO_LOGOUT = 5 // in Minutes | |
| const CHECK_INTERVALL = 1000 // in ms | |
| const STORE_KEY = 'lastAction'; | |
| @Injectable() |
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
| function alterItems(func) { | |
| if (!func) { | |
| func = () => { }; | |
| } | |
| if (typeof func !== 'function') { | |
| throw new errors.BadRequest('Function required. (alter)'); | |
| } |
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
| import { Injectable, PLATFORM_ID, Inject } from '@angular/core' | |
| import { isPlatformBrowser } from '@angular/common' | |
| import { HttpClient, HttpHeaders } from '@angular/common/http' | |
| import { rxUniversal } from '../../lib/rx-universal' | |
| import feathers from '@feathersjs/feathers' | |
| import rest from '@feathersjs/rest-client' | |
| import socketio from '@feathersjs/socketio-client' | |
| import * as rx from 'feathers-reactive' | |
| import * as io from 'socket.io-client' |
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
| import * as superagent from 'superagent' | |
| @Injectable() | |
| export class DataService { | |
| constructor( | |
| @Inject(PLATFORM_ID) private platformId: Object | |
| ) { | |
| if (isPlatformBrowser(this.platformId)) { | |
| const socket = io(this.BASE_URL) | |
| this.app |
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
| import { Observable } from 'rxjs/Observable' | |
| export function rxUniversal(options = {}) { | |
| const mixin = function (service) { | |
| const app = this | |
| const serviceMixin = { | |
| watch(watchOptions = {}) { | |
| const methods = {} |
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
| @Injectable() | |
| export class DataService { | |
| constructor( | |
| ) { | |
| const socket = io(this.BASE_URL) | |
| this.app | |
| .configure(socketio(socket)) | |
| .configure(rx({ idField: '_id' })) | |
| } |
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
| import feathers from '@feathersjs/feathers' | |
| import * as io from 'socket.io-client' | |
| import socketio from '@feathersjs/socketio-client' | |
| import * as rx from 'feathers-reactive' | |
| const app = feathers() | |
| const socket = io(BASE_URL) | |
| app | |
| .configure(socketio(socket)) | |
| .configure(rx({ idField: '_id' })) |
NewerOlder