repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
janCstoffregen/raeber-mit-generischer-suche
src/client/app/register/titelregister/register-titelregister.component.ts
/** * Created by <NAME> (rfbaumgartner) on 07.07.17. */ import { Component, Input, OnInit } from '@angular/core'; import { Http } from '@angular/http'; import { ActivatedRoute, Params, Router } from '@angular/router'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/map'; import { FulltextSearch } from '...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/fassung/fassung-diplomatisch/fassung-diplomatisch.component.ts
<reponame>janCstoffregen/raeber-mit-generischer-suche /** * Created by <NAME> (rfbaumgartner) on 24.07.17. */ import { Component, Input } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-fassung-diplomatisch', templateUrl: 'fassung-diplomatisch.component.html' }) export class FassungDiplo...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/synopse/synopse.component.ts
/** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component, OnInit } from '@angular/core'; import { Http } from '@angular/http'; import { ActivatedRoute, Params } from '@angular/router'; import { ExtendedSearch, KnoraProperty } from '../shared/utilities/knora-api-params'; @Component({ moduleId: module.id...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/suche/textgrid/textgrid.module.ts
<reponame>janCstoffregen/raeber-mit-generischer-suche /** * Created by <NAME> (<EMAIL>) on 7/21/17. */ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { MdButtonToggleModule, MdCardModule } from '@angular/material'; import { RouterModule } from '@angular/router'; imp...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/statisch/pdf-notizbuecher.component.ts
/** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-pdf-notizbuecher', templateUrl: 'pdf-notizbuecher.component.html' }) export class PdfNotizbuecherComponent { title = 'pdf-Dateien (Notizbuecher)'; creationDate = 'Don...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/fassung/fassung-routing.module.ts
<gh_stars>0 /** * Created by <NAME> (rfbaumgartner) on 05.07.17. */ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { FassungComponent } from './fassung.component'; @NgModule({ imports: [ RouterModule.forChild([ { path: 'drucke/abgewandt-zugewandt/:konvol...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/statisch/signaturen.component.ts
<filename>src/client/app/statisch/signaturen.component.ts /** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-signaturen', templateUrl: 'signaturen.component.html' }) export class SignaturenComponent { title = 'Der Lyrik...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/register/register.component.ts
/** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component, OnInit } from '@angular/core'; import { Http } from '@angular/http'; import { ActivatedRoute, Router } from '@angular/router'; import '../operators'; @Component({ moduleId: module.id, selector: 'rae-register', templateUrl: 'register.component...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/core/fusszeile.component.ts
<reponame>janCstoffregen/raeber-mit-generischer-suche<gh_stars>0 /** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-fusszeile', templateUrl: './fusszeile.component.html' }) export class FusszeileComponent { }
janCstoffregen/raeber-mit-generischer-suche
src/client/app/konvolut/konvolut-routing.module.ts
/** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { KonvolutComponent } from './konvolut.component'; import { SuperKonvolutComponent } from './super-konvolut.component'; @NgModule({ imports: [ RouterModule.forChild(...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/konvolut/konvolut.module.ts
/** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule } from '@angular/http'; import { MdButtonModule, MdButtonToggleModule, MdCardModule, MdGridListModule, MdIconModule, MdInputModule, MdToolbarModule }...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/core/core-routing.module.ts
import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { HomepageComponent } from '../statisch/homepage.component'; import { ImpressumComponent } from '../statisch/impressum.component'; import { SignaturenComponent } from '../statisch/signaturen.component'; import { WerklisteC...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/shared/image-frame/image-frame.component.ts
<gh_stars>0 import { Component, OnInit, Input } from '@angular/core'; import { Http, Headers, Response } from '@angular/http'; import { ActivatedRoute, Params, Router } from '@angular/router'; import { Observable } from 'rxjs/Observable'; import 'rxjs/Rx'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/ma...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/core/navigationsleiste.component.ts
<reponame>janCstoffregen/raeber-mit-generischer-suche /** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-navigationsleiste', templateUrl: './navigationsleiste.component.html' }) export class NavigationsleisteComponent { }...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/fassung/fassung-steckbrief/fassung-steckbrief.component.ts
<filename>src/client/app/fassung/fassung-steckbrief/fassung-steckbrief.component.ts /** * Created by <NAME> (rfbaumgartner) on 05.07.17. */ import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-fassung-steckbrief', templateUrl: 'fassung-steckbrief.component.html' }) expor...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/konvolut/konvolut.component.ts
<reponame>janCstoffregen/raeber-mit-generischer-suche<filename>src/client/app/konvolut/konvolut.component.ts /** * Created by retobaumgartner on 06.06.17. */ import { Component, OnInit } from '@angular/core'; import { Http } from '@angular/http'; import { ActivatedRoute } from '@angular/router'; import 'rxjs/add/ope...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/statisch/homepage.component.ts
<filename>src/client/app/statisch/homepage.component.ts /** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component } from '@angular/core'; @Component({ moduleId: module.id, selector: 'rae-homepage', templateUrl: 'homepage.component.html' }) export class HomepageComponent { title = 'Historisch-kritis...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/fassung/fassung.component.ts
<reponame>janCstoffregen/raeber-mit-generischer-suche /** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component, OnInit } from '@angular/core'; import { Http } from '@angular/http'; import { ActivatedRoute, Params, Router } from '@angular/router'; import 'rxjs/add/operator/catch'; import 'rxjs/add/operator/...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/suche/suche.component.ts
<gh_stars>0 /** * Created by <NAME> (<EMAIL>) on 6/7/17. */ import { Component, OnInit } from '@angular/core'; import { Http, Response } from '@angular/http'; import { globalSearchVariableService } from './globalSearchVariablesService'; import {isUndefined} from "util"; import {forEach} from "@angular/router/src/uti...
janCstoffregen/raeber-mit-generischer-suche
src/client/app/statisch/statisch-routing.module.ts
import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { HomepageComponent } from './homepage.component'; import { ImpressumComponent } from './impressum.component'; import { SignaturenComponent } from './signaturen.component'; import { WerklisteComponent } from './werkliste.c...
McAngelo/pangaea-product-cart
src/App.tsx
import React, { useReducer, useCallback, useState, useEffect } from 'react'; import logo from './logo.svg'; import './App.css'; //import Home from "./Home"; //import AnotherScreen from "./AnotherScreen"; import Greeting from "./GreetingFunctional"; import ListCreator, { ListItem } from './ListCreator'; //import { Switc...
McAngelo/pangaea-product-cart
src/Home.tsx
<filename>src/Home.tsx import React, { FC } from "react"; // eslint-disable-next-line @typescript-eslint/no-unused-vars const Home : FC = () =>{ return <div>Hello World! Home </div>; }; export default Home;
McAngelo/pangaea-product-cart
src/ListCreator.tsx
import React, { FC, useEffect, useRef } from 'react'; export interface ListItem{ id: number; } export interface ListItems { listItems?: Array<ListItem>; } const ListCreator: FC<ListItems> = React.memo(({listItems}: ListItems) => { let renderItems = useRef<Array<JSX.Element> | undefined>(); useEffect...
McAngelo/pangaea-product-cart
src/GreetingFunctional.tsx
<reponame>McAngelo/pangaea-product-cart import React from "react"; interface GreetingProps { enteredName: string; message: string; greetingDispatcher: React.Dispatch<{ type: string, payload: string}>; } export default function Greeting(props: GreetingProps) { const onChangeName = (e: React.ChangeEvent...
McAngelo/pangaea-product-cart
src/AnotherScreen.tsx
<gh_stars>0 import React, { FC } from "react"; const AnotherScreen: FC = () => { return <div>Hello World! Another Screen</div>; }; export default AnotherScreen;
Fgerthoffert/jira-clone-issues
src/utils/jira/utils/batchUpdateIssues/index.ts
<reponame>Fgerthoffert/jira-clone-issues<gh_stars>0 import { JiraMap } from '../../../../global'; import getIssueTransitions from '../getIssueTransitions'; import updateIssue from '../updateIssue'; import { Config, JiraTransition } from '../../../../global'; const batchUpdateIssues = async (userConfig: Config, issue...
Fgerthoffert/jira-clone-issues
src/utils/jira/utils/updateIssue/index.ts
import axios from 'axios'; import { JiraInstance, JiraIssue } from '../../../../global'; import { sleep } from '../../../utils'; const updateIssue = async (jiraServer: JiraInstance, issue: JiraIssue) => { if (jiraServer !== undefined) { let response: any = {} try { response = await axios({ me...
Fgerthoffert/jira-clone-issues
src/utils/jira/utils/fetchJql/index.ts
import axios from 'axios'; import { performance } from 'perf_hooks'; import { JiraIssue, JiraInstance } from '../../../../global'; export const fetchJql = async ( jiraServer: JiraInstance, jqlQuey: string, fields: string, startAt: number, maxResults: number, ) => { if (jiraServer !== undefined) { cons...
Fgerthoffert/jira-clone-issues
src/utils/utils.ts
export const sleep = (ms: number) => { //https://github.com/Microsoft/tslint-microsoft-contrib/issues/355 // tslint:disable-next-line no-string-based-set-timeout return new Promise(resolve => setTimeout(resolve, ms)); };
Fgerthoffert/jira-clone-issues
types/load-yaml-file.d.ts
<filename>types/load-yaml-file.d.ts declare module 'load-yaml-file';
Fgerthoffert/jira-clone-issues
src/commands/prepare.ts
import { flags } from '@oclif/command'; import * as fs from 'fs'; import * as path from 'path'; import cli from 'cli-ux'; import Command from '../base'; import { JiraIssue, JiraInstance, } from '../global'; import fetchJqlPagination from '../utils/jira/utils/fetchJql'; import getProject from '../utils/jira/util...
Fgerthoffert/jira-clone-issues
src/base.ts
import Command from '@oclif/command'; import * as fs from 'fs'; import * as fse from 'fs-extra'; import * as jsYaml from 'js-yaml'; import loadYamlFile from 'load-yaml-file'; import * as path from 'path'; import { Config } from './global'; import { defaultConfig } from './components/config/index'; export default abst...
Fgerthoffert/jira-clone-issues
src/utils/jira/utils/createEmptyIssue/index.ts
import axios from 'axios'; import { JiraInstance, JiraInstanceDestination } from '../../../../global'; import { sleep } from '../../../utils'; const createEmptyIssue = async (jiraServer: JiraInstance & JiraInstanceDestination, sourceKey: string) => { const issueDataFields: any = { project: { key: jiraSer...
Fgerthoffert/jira-clone-issues
src/components/config/index.ts
export { default as zencrepesConfig } from './defaultConfig.type'; export { default as defaultConfig } from './defaultConfig';
Fgerthoffert/jira-clone-issues
src/utils/jira/utils/batchUpdateStatus/index.ts
<gh_stars>0 import { JiraIssue } from '../../../../global'; import getIssueTransitions from '../getIssueTransitions'; import transitionIssue from '../transitionIssue'; import { Config, JiraTransition } from '../../../../global'; const batchUpdateStatus = async (userConfig: Config, issuesToPush: any[], destinationIss...
Fgerthoffert/jira-clone-issues
src/components/config/defaultConfig.ts
const defaultConfig = { source: { host: 'https://jira.domain.com/', username: 'USERNAME', password: 'PASSWORD', projectKey: 'DMF', fetch: { maxNodes: 30, }, }, destination: { host: 'https://jira.domain.com/', username: 'USERNAME', password: 'PASSWORD', projectKey:...
Fgerthoffert/jira-clone-issues
src/components/config/defaultConfig.type.ts
export interface JiraInstance { host: string; username: string; password: <PASSWORD>; projectKey: string; fetch: { maxNodes: number; } } export interface JiraInstanceDestination { defaultIssueType: string; fields: { syncSourceUpdatedAt: string; } } export interface JiraMap { source: string...
Fgerthoffert/jira-clone-issues
src/commands/update.ts
import { flags } from '@oclif/command'; import cli from 'cli-ux'; import Command from '../base'; import { JiraInstance, JiraInstanceDestination } from '../global'; import { fetchJql } from '../utils/jira/utils/fetchJql'; import fetchJqlPagination from '../utils/jira/utils/fetchJql'; import createEmptyIssue fro...
Fgerthoffert/jira-clone-issues
src/global.ts
<reponame>Fgerthoffert/jira-clone-issues export { Config, JiraInstance, JiraInstanceDestination, JiraMap, } from './components/config/defaultConfig.type'; export interface JiraTransition { id: string; name: string; } export interface JiraIssueFields { status: { name: string; }; issuetype: { ...
sonlinux/shopu
src/index.tsx
<gh_stars>1-10 import { defaultDataIdFromObject, InMemoryCache } from "apollo-cache-inmemory"; import { persistCache } from "apollo-cache-persist"; import { ApolloClient } from "apollo-client"; import { ApolloLink } from "apollo-link"; import { BatchHttpLink } from "apollo-link-batch-http"; import { RetryLink } from "a...
sonlinux/shopu
src/components/MainMenu/MainMenu.tsx
<reponame>sonlinux/shopu import { mediumScreen, smallScreen } from "../../globalStyles/scss/variables.scss"; import "./scss/index.scss"; import * as React from "react"; import Media from "react-media"; import { Link } from "react-router-dom"; import ReactSVG from "react-svg"; import { MenuDropdown, Offline, ...
splitinfinities/lottie-wc
src/components/lottie-animation/lottie-animation.tsx
<gh_stars>100-1000 import { Component, Prop, State, Method, Element } from '@stencil/core'; import lottie from 'lottie-web'; @Component({ tag: 'lottie-animation', styleUrl: 'lottie-animation.css' }) export class LottieAnimation { @Element() element: HTMLElement; @Element() progress: HTMLElement; /** * in...
splitinfinities/lottie-wc
src/components.d.ts
/** * This is an autogenerated file created by the Stencil build process. * It contains typing information for all components that exist in this project * and imports for stencil collections that might be configured in your stencil.config.js file */ declare global { namespace JSX { interface Element {} ex...
nw55/es-logging
src/filter.ts
import { ArgumentError, LogLevelKeys } from '@nw55/common'; import { LogMessage } from './common'; import { LogLevel } from './log-level'; export interface LogFilter { shouldLog: (level: LogLevel, source?: string) => boolean; shouldLogMessage: (message: LogMessage) => boolean; } type LogFilterFunction = (lev...
nw55/es-logging
test/combined-log-writer.ts
<reponame>nw55/es-logging import { LogLevelKeys } from '@nw55/common'; import { CombinedLogWriter, LogLevel, LogMessage, LogWriter } from '@nw55/logging'; import { assert } from 'chai'; import { describe, test } from 'mocha'; class TestLogWriter implements LogWriter { didLog = false; constructor(private _id: ...
nw55/es-logging
test/format.ts
<gh_stars>0 import { logFormat, LogLevel } from '@nw55/logging'; import { assert } from 'chai'; import { describe, test } from 'mocha'; describe('format', () => { test('logFormat', () => { const format = logFormat`${'level'} [${'source'}] ${logFormat.message}`; const text = format({ lev...
nw55/es-logging
src/combined-log-writer.ts
<reponame>nw55/es-logging<gh_stars>0 import { LogMessage, LogWriter } from './common'; import { LogLevel } from './log-level'; export class CombinedLogWriter implements LogWriter { static addLogWriter(logWriter: LogWriter | null, add: LogWriter) { if (logWriter === null) return add; ret...
nw55/es-logging
test/filter.ts
import { LogLevel, SourcePrefixLogFilter } from '@nw55/logging'; import { assert } from 'chai'; import { describe, test } from 'mocha'; describe('filter', () => { test('SourcePrefixLogFilter', () => { const filter = new SourcePrefixLogFilter('info', { '@nw55': 'warn', 'app': 'verbos...
nw55/es-logging
src/logger.ts
<filename>src/logger.ts import { AnyRecord, FatalError, LoggerStackTraceError, Mutable } from '@nw55/common'; import { LogMessage, LogWriter } from './common'; import { LogLevel } from './log-level'; type InforParams = | [message: string, details?: AnyRecord] | [message: string, code?: string, details?: AnyRec...
nw55/es-logging
src/message-writer.ts
import { LogLevelKeys } from '@nw55/common'; import { LogMessage } from './common'; export interface LogMessageWriter { writeMessage(text: string, message: LogMessage): void; } function inheritLogLevelProperties<D, T = D>(properties: Partial<Record<LogLevelKeys, T>>, defaultValue: D): Record<LogLevelKeys, T | D> ...
nw55/es-logging
src/index.ts
export * from './combined-log-writer'; export * from './common'; export * from './console'; export * from './default-log-writer'; export * from './details-formatter'; export * from './filter'; export * from './format'; export * from './log'; export * from './log-level'; export * from './logger'; export * from './messag...
nw55/es-logging
src/log.ts
<reponame>nw55/es-logging import { LoggingProvider } from '@nw55/common'; import { CombinedLogWriter } from './combined-log-writer'; import { LogWriter } from './common'; import { LogLevel } from './log-level'; import { Logger } from './logger'; export namespace Log { let globalLogWriter: LogWriter | null = null; ...
nw55/es-logging
src/log-level.ts
import { ArgumentError, LogLevelInfo, LogLevelKeys } from '@nw55/common'; import { LogFilter } from './filter'; export class LogLevel<K extends LogLevelKeys = LogLevelKeys> implements LogLevelInfo, LogFilter { private static _byKey = new Map<LogLevelKeys, LogLevel>(); private static _byValue = new Map<number, ...
nw55/es-logging
src/default-log-writer.ts
<gh_stars>0 import { LogMessage, LogWriter } from './common'; import { LogFilter } from './filter'; import { LogFormat, logFormat } from './format'; import { LogLevel } from './log-level'; import { LogMessageWriter } from './message-writer'; export interface DefaultLogWriterOptions { readonly filter?: LogFilter; ...
nw55/es-logging
src/details-formatter.ts
import { LogMessage } from './common'; export type LogErrorFormatter = (error: Error, message: LogMessage) => string; export type LogDetailsFormatter = (details: unknown, message: LogMessage) => string;
nw55/es-logging
src/writable-log-message-writer.ts
<filename>src/writable-log-message-writer.ts import { LogMessage } from './common'; import { LogDetailsFormatter, LogErrorFormatter } from './details-formatter'; import { defaultLogFilter, LogFilter } from './filter'; import { LogMessageWriter } from './message-writer'; const asStringFormatter: LogDetailsFormatter = o...
nw55/es-logging
src/common.ts
import { LogDetails } from '@nw55/common'; import { LogLevel } from './log-level'; export interface LogMessage extends LogDetails { readonly level: LogLevel; readonly source?: string; readonly message: string; } export interface LogWriter { shouldLog: (level: LogLevel, source?: string) => boolean; ...
nw55/es-logging
src/console.ts
<gh_stars>0 import { LogMessage } from './common'; import { defaultLogFilter, LogFilter } from './filter'; import { LogMessageWriter } from './message-writer'; type DetailsAndErrorParams = | [message: string, details?: unknown] | [message: string, error: Error, details?: unknown]; type ConsoleLogMessageWriter...
nw55/es-logging
src/format.ts
<reponame>nw55/es-logging import { ArgumentError } from '@nw55/common'; import { LogMessage } from './common'; export type LogFormat = (message: LogMessage) => string; type LogFormatPlaceholder = keyof typeof knownLogFormats | LogFormat; function placeholderLogFormat(placeholder: LogFormatPlaceholder): LogFormat { ...
ZxBing0066/zlib
packages/generate-password/index.ts
<reponame>ZxBing0066/zlib // exclude `l`, `o` const DefaultLowerCaseChars = 'abcdefghijkmnpqrstuvwxyz'; // exclude 'I', 'O' const DefaultUpperCaseChars = 'ABCDEFGHJKLMNPQRSTUVWXYZ'; // exclude '1' const DefaultDigits = '23456789'; // symbols const DefaultSymbols = '-_.:!'; // sequences of '-' or '_' will change to lon...
ZxBing0066/zlib
packages/shuffle/index.ts
<filename>packages/shuffle/index.ts const randomIndex = (l: number) => Math.floor(Math.random() * l); function shuffle( target: string, option?: { // By default, string shuffle will broken with char to multiple chars, use this for fix fix?: true; } ): string; function shuffle<T = any>( ...
ZxBing0066/zlib
packages/diff/index.ts
<reponame>ZxBing0066/zlib<gh_stars>1-10 interface Diff<T = any> { type: 'ADD' | 'REMOVE' | 'CHANGE'; path: (string | number)[]; old?: T; new?: T; } const needDig = (obj: any) => { if (obj !== null && typeof obj === 'object') { const cname = Object.getPrototypeOf(obj).constructor.name; ...
abraham/gde-social
packages/web/functions/src/mdc.test.ts
import { activatedClass } from './mdc'; test('activatedClass', () => { expect(activatedClass('angular', 'angular')).toEqual( 'mdc-list-item--activated', ); expect(activatedClass('angular', 'android')).toEqual(''); });
abraham/gde-social
packages/stream/pubsub.ts
import { PubSub, Topic } from '@google-cloud/pubsub'; const projectId = process.env.GCLOUD_PROJECT_ID; const pubsub = new PubSub({ projectId, }); export async function publish(statusId: string): Promise<boolean> { const topicName = `projects/${projectId}/topics/new_status`; await getTopicAndPublish(topicName, s...
abraham/gde-social
packages/web/functions/src/mdc.ts
<reponame>abraham/gde-social export const activatedClass = (a: string, b: string): string => a === b ? 'mdc-list-item--activated' : '';
abraham/gde-social
packages/web/functions/src/data/status.data.ts
<reponame>abraham/gde-social<gh_stars>1-10 import { Status } from 'twitter-d'; export const status: Status = { created_at: 'Tue Mar 21 20:50:14 +0000 2006', id: 20, id_str: '20', full_text: 'just setting up my twttr', truncated: false, display_text_range: [0, 24], entities: { hashtags: [], symbol...
abraham/gde-social
packages/web/functions/src/status.ts
import { Status, convertDate, parseHashtags } from './twitter'; export const version = 2; export function buildStatus(status: Status) { const createdAt = convertDate(status.created_at); const hashtags = parseHashtags(status).reduce( (sortableHashtags: any, hashtag: string) => { sortableHashtags[hashtag]...
abraham/gde-social
packages/web/scripts/migrate.ts
import * as admin from 'firebase-admin'; import { buildStatus, version } from '../functions/src/status'; admin.initializeApp(); const db = admin.firestore(); async function migrate() { let next = true; let query = page(); let migrated = 0; while (next) { const snapshot = await query.get(); const la...
abraham/gde-social
packages/web/scripts/copy-data.ts
<reponame>abraham/gde-social import * as admin from 'firebase-admin'; const fromProjectId = 'gde-social'; const toProjectId = 'gde-social-dev'; const limit = 100; const fromApp = admin.initializeApp({ projectId: fromProjectId }, 'from'); const fromDb = fromApp.firestore(); const toApp = admin.initializeApp({ project...
abraham/gde-social
packages/web/scripts/count.ts
<reponame>abraham/gde-social import * as admin from 'firebase-admin'; admin.initializeApp(); const db = admin.firestore(); async function count() { let next = true; let query = page(); let counted = 0; while (next) { const snapshot = await query.get(); const lastDocument = snapshot.docs[snapshot.doc...
abraham/gde-social
packages/web/scripts/bearer.ts
import * as request from 'request-promise-native'; const config = require('../.runtimeconfig.json').twitter; const credentials = Buffer.from(`${config.key}:${config.secret}`).toString( 'base64', ); const url = 'https://api.twitter.com/oauth2/token'; interface BearerToken { token_type: string; access_token: strin...
abraham/gde-social
packages/stream/app.ts
<gh_stars>1-10 import * as Twit from 'twit'; import { Status, User } from 'twitter-d'; import { publish } from './pubsub'; const config = require('./.runtimeconfig.json').twitter; const T = new Twit({ ...config, strictSSL: true, } as Twit.Options); // TODO: remove 'as Twit.Options' const listParams = { slug: '...
abraham/gde-social
packages/web/functions/src/pagination.test.ts
<reponame>abraham/gde-social import { LIMIT } from './pagination'; test('LIMIT', () => { expect(LIMIT).toEqual(25); });
abraham/gde-social
packages/web/functions/src/index.ts
import * as express from 'express'; import * as exphbs from 'express-handlebars'; import * as admin from 'firebase-admin'; import * as functions from 'firebase-functions'; import { activatedClass as mdcActivatedClass } from './mdc'; import { LIMIT } from './pagination'; import { buildStatus } from './status'; import { ...
abraham/gde-social
packages/web/functions/src/twitter.ts
import * as Twit from 'twit'; import { Status, User } from 'twitter-d'; export { Status }; export interface TwitterCredentials { consumer_key: string; consumer_secret: string; access_token: string; access_token_secret: string; } export interface StatusRef { id: string; updatedAt: Date; data: Status; } ...
abraham/gde-social
packages/web/scripts/crawl-list.ts
<reponame>abraham/gde-social<filename>packages/web/scripts/crawl-list.ts import * as admin from 'firebase-admin'; import { TwitterClient } from '../functions/src/twitter'; import { buildStatus } from '../functions/src/status'; const config = require('../.runtimeconfig.json').twitter; admin.initializeApp(); const db...
abraham/gde-social
packages/web/functions/src/status.test.ts
import { version, buildStatus } from './status'; import { status } from './data/status.data'; test('version', () => { expect(version).toEqual(2); }); beforeEach(() => { jest.spyOn(global.Date, 'now').mockImplementation(() => 123456789); }); afterEach(() => { jest.clearAllMocks(); }); test('buildStatus', () =>...
vcalendars/internal-season-api
index.ts
import Knex from 'knex'; import Logger from '@danielemeryau/logger'; import { InternalSeasonServiceServer } from '@teamest/internal-season-server'; import InternalSeasonService from './src/service'; const logger = new Logger('internal-season-api'); const PORT = (process.env.PORT && parseInt(process.env.PORT)) || 901...
vcalendars/internal-season-api
migrations/20200130162934_table_creation.ts
import * as Knex from 'knex'; export async function up(knex: Knex): Promise<any> { await knex.schema.createTable('team_season', function(table) { table.uuid('team_season_id').primary(); table.string('team_name').notNullable(); table.string('competition_name').notNullable(); table.string('season_name'...
vcalendars/internal-season-api
src/data.types.ts
import { SerialisedEvent } from "@teamest/models/raw"; export interface TeamSeason { team_season_id: string; team_name: string; competition_name: string; season_name: string; created_at: string; updated_at: string; } export interface TeamSeasonVersion { team_season_version_id: string; team_season_id: ...
vcalendars/internal-season-api
knexfile.ts
<reponame>vcalendars/internal-season-api<filename>knexfile.ts module.exports = { development: { client: 'mysql2', connection: { host: process.env.MYSQL_HOST || 'localhost', user: process.env.MYSQL_USER || 'internal_season', password: process.env.MYSQL_PASS || '<PASSWORD>', database: pr...
vcalendars/internal-season-api
src/service.ts
<filename>src/service.ts import Knex from 'knex'; import Logger from '@danielemeryau/logger'; import deepEqual from 'fast-deep-equal'; import { v4 as uuidv4 } from 'uuid'; import { Event } from '@teamest/models/raw'; import * as DataTypes from './data.types'; import { SavedTeamSeason } from '@teamest/models/processed...
schippie/NG2-Stream-Pipe
example/app/app.ts
<reponame>schippie/NG2-Stream-Pipe import {Component} from 'angular2/core'; import {RouteConfig, Router, ROUTER_DIRECTIVES} from 'angular2/router'; import {HomeComponent} from './components/home/home'; @Component({ selector: 'my-app', template: '<router-outlet></router-outlet>', directives: [ROUTER_DIRECTIVES] }) @...
schippie/NG2-Stream-Pipe
example/app/injectables/providers.ts
/** * Within this file you can specify all the providers that you require within your application * This is kept outside of the main.ts to make that file a lot cleaner. */ import {ROUTER_PROVIDERS} from 'angular2/router'; export const CUSTOM_PROVIDERS = [ ROUTER_PROVIDERS ];
schippie/NG2-Stream-Pipe
example/app/main.ts
<gh_stars>1-10 import '!style!css!sass!./assets/css/style.scss'; import 'es6-shim'; import 'zone.js'; import 'reflect-metadata'; import {provide, enableProdMode} from 'angular2/core'; import {bootstrap, ELEMENT_PROBE_PROVIDERS} from 'angular2/platform/browser'; import {CUSTOM_PROVIDERS} from './injectables/providers'...
schippie/NG2-Stream-Pipe
src/stream.ts
import {Pipe, ChangeDetectorRef, OnDestroy, PipeTransform, WrappedValue} from 'angular2/core'; import {Observable} from "rxjs/Observable"; import {Subscription} from "rxjs/Subscription"; /** * The `stream` pipe subscribes to an Observable and adds the latest value automatically to its array. Or if an array is supplie...
schippie/NG2-Stream-Pipe
test/stream.spec.ts
import {describe, it, expect, beforeEach, afterEach, inject, injectAsync} from 'angular2/testing'; import {WrappedValue, ChangeDetectorRef} from 'angular2/core'; import {EventEmitter} from 'angular2/src/facade/async'; import {StreamPipe} from '../src/stream'; import {AsyncTestCompleter} from "angular2/testing_internal"...
schippie/NG2-Stream-Pipe
test/test.main.ts
/** * Import a couple of angular specific files that are generally required by all unit-tests. Through the import 'test.main.te' * These include setting the providers in testing mode etc. And include the es6-shim, zone.js and reflect-metadata */ import 'es6-shim'; import 'zone.js'; import 'reflect-metadata'; import...
schippie/NG2-Stream-Pipe
example/app/components/home/home.ts
<reponame>schippie/NG2-Stream-Pipe<filename>example/app/components/home/home.ts import {Component} from 'angular2/core'; import {Title} from 'angular2/platform/browser'; import {StreamPipe} from "../../../../src/stream"; import {Observable} from "rxjs/Observable"; @Component({ selector: 'home-component', template: r...
Broadcom/cdd-grafana-datasource
src/types.ts
<reponame>Broadcom/cdd-grafana-datasource import { DataQuery, DataSourceJsonData, SelectableValue } from '@grafana/data'; /** * CONSTANTS */ export const optionsPeriod: Array<SelectableValue<string>> = []; const optionPeriod1: SelectableValue = { label: 'Minute', value: 'MINUTE' }; const optionPeriod2: SelectableVa...
Broadcom/cdd-grafana-datasource
src/datasource.ts
import { getBackendSrv, getTemplateSrv } from '@grafana/runtime'; import { DataQueryRequest, DataQueryResponse, DataSourceApi, DataSourceInstanceSettings, MutableDataFrame, FieldType, DateTime, } from '@grafana/data'; import { optionsPeriod, CddQuery, CddDataSourceOptions, getInitialMetric, getCurrentFiel...
Broadcom/cdd-grafana-datasource
src/QueryEditor.tsx
<filename>src/QueryEditor.tsx import React, { ChangeEvent, PureComponent } from 'react'; import { getBackendSrv } from '@grafana/runtime'; import { QueryEditorProps, SelectableValue } from '@grafana/data'; import { DataSource } from './datasource'; import { CddDataSourceOptions, CddQuery, optionsPeriod, Metric,...
Broadcom/cdd-grafana-datasource
src/ConfigEditor.tsx
import React, { ChangeEvent, PureComponent } from 'react'; import { LegacyForms } from '@grafana/ui'; import { DataSourcePluginOptionsEditorProps } from '@grafana/data'; import { CddDataSourceOptions, MySecureJsonData } from './types'; const { SecretFormField, FormField } = LegacyForms; interface Props extends DataSo...
849203846/alibabacloud-console-widget
packages/widget-loader/index.d.ts
<gh_stars>1-10 /// <reference types="react" /> import { ComponentType, SuspenseProps } from 'react'; // FIXME 非 OneConsole 的场景,这里每一个都要设置... export interface IWidgetUtilsConsole { getLang?: () => string; getLocale?: () => string; getChannel?: () => string; getCurrentUid?: () => string; getParentUid?: () ...
849203846/alibabacloud-console-widget
packages/widget-utils-rc/index.d.ts
<gh_stars>1-10 /// <reference types="react" /> import { Component, ComponentType, ReactNode } from 'react'; interface IChannelLinkProps { id: string; values?: { [k: string]: string; }; children: ReactNode; target?: string; className?: string; shape?: string; type?: string; size?: string; ...
849203846/alibabacloud-console-widget
packages/widget-hooks/index.d.ts
<filename>packages/widget-hooks/index.d.ts /// <reference types="react" /> import { ReactElement } from 'react'; interface IConsoleConfig { features: { [k: string]: { status: boolean; attribute?: { regions?: string[]; }; }; }; links: { [k: string]: string; }; } export ...
thomas-lab/Leaflet.MapboxVectorTile
exported_typings/leaflet-mvt.d.ts
<filename>exported_typings/leaflet-mvt.d.ts<gh_stars>0 declare module LeafletMVT { // Tag interface export interface Style {} interface PointBaseStyle { color: string; radius: number; } export interface PointStyle extends PointBaseStyle, Style { selected?: PointBaseStyle ...
foxhatleo/dragonglass-level-editor
components/AuthManager.tsx
<gh_stars>0 import React, {useEffect, useState} from "react"; import {Button, Modal} from "react-bootstrap"; import * as Dispatcher from "../redux/action/Dispatcher"; import {connect, ConnectedProps} from "react-redux"; import {bindActionCreators} from "redux"; import State from "../redux/store/State"; import * as Conf...
foxhatleo/dragonglass-level-editor
components/FileManager.tsx
import React, {ChangeEvent, SyntheticEvent, useEffect, useState} from "react"; import {connect, ConnectedProps} from "react-redux"; import State from "../redux/store/State"; import {bindActionCreators} from "redux"; import * as Dispatcher from "../redux/action/Dispatcher"; import {Button, FormControl, Modal} from "reac...
foxhatleo/dragonglass-level-editor
config/Debug.ts
export function isDebug(): boolean { return (typeof location !== "undefined" && ( location.hostname === "localhost" || location.hostname === "127.0.0.1")); }