file_path stringlengths 3 280 | file_language stringclasses 66
values | content stringlengths 1 1.04M | repo_name stringlengths 5 92 | repo_stars int64 0 154k | repo_description stringlengths 0 402 | repo_primary_language stringclasses 108
values | developer_username stringlengths 1 25 | developer_name stringlengths 0 30 | developer_company stringlengths 0 82 |
|---|---|---|---|---|---|---|---|---|---|
src/modal.component.scss | SCSS | /**
* A more specific selector overwrites bootstrap display properties, but they still enable users
* to overwite them on their apps.
*/
/deep/ modal .modal {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
/deep/ .modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
min-... | zurfyx/angular-custom-modal | 30 | Angular2+ Modal / Dialog (with inner component support). | TypeScript | zurfyx | Gerard Rovira | facebook |
src/modal.component.spec.ts | TypeScript | it('works', () => {});
| zurfyx/angular-custom-modal | 30 | Angular2+ Modal / Dialog (with inner component support). | TypeScript | zurfyx | Gerard Rovira | facebook |
src/modal.component.ts | TypeScript | /* tslint:disable:component-selector */
import {
Component,
OnDestroy,
ContentChild,
ElementRef,
TemplateRef,
ChangeDetectionStrategy,
ChangeDetectorRef,
Input,
HostListener,
} from '@angular/core';
@Component({
selector: 'modal',
templateUrl: 'modal.component.html',
styleUrls: ['modal.compone... | zurfyx/angular-custom-modal | 30 | Angular2+ Modal / Dialog (with inner component support). | TypeScript | zurfyx | Gerard Rovira | facebook |
src/modal.module.ts | TypeScript | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ModalComponent } from './modal.component';
@NgModule({
imports: [
CommonModule,
],
exports: [ModalComponent],
declarations: [ModalComponent],
providers: [],
})
export class ModalModule { }
| zurfyx/angular-custom-modal | 30 | Angular2+ Modal / Dialog (with inner component support). | TypeScript | zurfyx | Gerard Rovira | facebook |
config/environment.prod.ts | TypeScript | export const environment = {
production: true
};
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
config/environment.ts | TypeScript | // The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angul... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
e2e/app.e2e-spec.ts | TypeScript | import { AppPage } from './app.po';
describe('App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
page.navigateTo();
});
it('should display "<Angular 5 Library Starter Kit>"', () => {
expect(page.getTitleText()).toContain('<Angular 5 Library Starter Kit>');
});
});
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
e2e/app.po.ts | TypeScript | import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getTitleText() {
return element(by.css('app-root h1')).getText();
}
}
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/app/app.component.html | HTML | <div class="greetings center">
<div>
<h1>{{ 'Angular 5 Library Starter Kit' | taggify }}</h1>
<a class="neat shadowy" href="https://github.com/zurfyx/angular-library-starter-kit" rel="noopener" target="_blank">Get your own Angular library published in few minutes</a>
</div>
</div> | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/app/app.component.scss | SCSS | @import url('https://fonts.googleapis.com/css?family=Montserrat|Open+Sans');
html, body {
color: #444;
font-family: 'Open Sans', sans-serif;
background: #4aabc9;
background: linear-gradient(135deg, #4aabc9 0%,#7db9e8 100%);
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
h1 {
font-family: 'Monts... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/app/app.component.ts | TypeScript | import { Component, ViewEncapsulation, ViewChild } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
encapsulation: ViewEncapsulation.None,
})
export class AppComponent { }
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/app/app.module.ts | TypeScript | import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { TaggifyModule } from '../../src';
import { AppComponent } from './app.component';
@NgModule({
imports: [
BrowserModule,
TaggifyModule,
],
declarations: [
AppComponent,
],
providers: [],... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/index.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular Library Starter Kit</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/main.ts | TypeScript | import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from '../config/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapModule(A... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/polyfills.ts | TypeScript | /**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/test.ts | TypeScript | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/long-stack-trace-zone';
import 'zone.js/dist/proxy.js';
import 'zone.js/dist/sync-test';
import 'zone.js/dist/jasmine-patch';
import 'zone.js/dist/async-test';
import 'zone.js/dist/fake-async-test';
i... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
example/typings.d.ts | TypeScript | /* SystemJS module definition */
declare var module: NodeModule;
interface NodeModule {
id: string;
}
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
karma.conf.js | JavaScript | // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-l... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
protractor.conf.js | JavaScript | // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName':... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
src/index.ts | TypeScript | export * from './taggify.pipe';
export * from './taggify.module';
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
src/taggify.module.ts | TypeScript | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TaggifyPipe } from './taggify.pipe';
@NgModule({
imports: [
CommonModule,
],
exports: [
TaggifyPipe,
],
declarations: [
TaggifyPipe,
],
providers: [],
})
export class TaggifyModule { }
| zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
src/taggify.pipe.spec.ts | TypeScript | import { TaggifyPipe } from './taggify.pipe';
describe('TaggifyPipe', () => {
let pipe;
beforeEach(() => {
pipe = new TaggifyPipe();
});
it('should taggify a "hey there"', () => {
expect(pipe.transform('hey there')).toBe('<hey there>');
});
it('should not taggify "<hey there>... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
src/taggify.pipe.ts | TypeScript | import { Pipe, PipeTransform } from '@angular/core';
/**
* Wrap between <>
*
* Usage:
* {{str | taggify}}
*
* Rules:
* An empty or null string will never be taggified.
* A taggified string won't be taggified again.
* All other string values will be taggified.
*/
@Pipe({
name: 'taggify'
})
export class Tagg... | zurfyx/angular-library-starter-kit | 34 | Angular 5 Library Starter Kit based on Angular-CLI | TypeScript | zurfyx | Gerard Rovira | facebook |
build.sh | Shell | #!/bin/bash
mvn clean package | zurfyx/cassandra-hadoop-example | 3 | Cassandra Hadoop Example | Java | zurfyx | Gerard Rovira | facebook |
src/main/java/main/WordCountCassandra.java | Java | package main;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.*;
import org.apache.cassandra.hadoop.ConfigHelper;
import org.apache.cassandra.hadoop.cql3.CqlConfigHelper;
import org.apache.cassandra.hadoop.cql3.CqlOutputFormat;
import org.apache.cassandra.hadoop.cql3.CqlPagingInputFormat;
imp... | zurfyx/cassandra-hadoop-example | 3 | Cassandra Hadoop Example | Java | zurfyx | Gerard Rovira | facebook |
ffmpeg-tv.py | Python | #!/usr/bin/env python
#
# --------------------------------------------------------------------------------------------------
# == FFMPEG TV STANDARDS ==
# UPDATED FOR 2016 STANDARDS https://scenerules.org/t.html?id=tvx2642k16.nfo
# Author: zurfyx (https://stackoverflow.com/users/2013580/zurfyx)
# Special thanks to: slh... | zurfyx/ffmpeg-tv | 15 | TV video encoding without hassle. | Python | zurfyx | Gerard Rovira | facebook |
api/index.js | JavaScript | const express = require('express');
const cors = require('cors');
var app = express();
app.use(cors());
app.use('/', (req, res) => {
const now = Date.now();
setTimeout(() => {
res.send(String(now));
}, 15e3);
});
app.listen(3000, () => console.info('Running on port 3000'));
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
e2e/protractor.conf.js | JavaScript | // Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./src/**/*.e2e-spec.ts'
],
capabilities: {
'browserName':... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
e2e/src/app.e2e-spec.ts | TypeScript | import { AppPage } from './app.po';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Welcome to rxjs-unsubscribe!');
});
});
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
e2e/src/app.po.ts | TypeScript | import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getTitleText() {
return element(by.css('app-root h1')).getText();
}
}
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/app.component.html | HTML | {{ title }}
<button (click)="isFoo = !isFoo">toggle</button>
<app-foo *ngIf="isFoo"></app-foo>
<app-bar *ngIf="!isFoo"></app-bar> | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/app.component.spec.ts | TypeScript | import { TestBed, async } from '@angular/core/testing';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
}).compileComponents();
}));
it('should create the app', ... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/app.component.ts | TypeScript | import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'rxjs-unsubscribe';
}
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/app.module.ts | TypeScript | import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { AppComponent } from './app.component';
import { FooComponent } from './foo.component';
import { BarComponent } from './bar.component';
@NgModule({
de... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/bar.component.html | HTML | foo component | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/bar.component.ts | TypeScript | import { Component, OnInit, OnDestroy } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@Component({
selector: 'app-bar',
templateUrl: 'bar.component.html'
})
export class BarComponent implements OnInit, OnDestroy ... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/foo.component.html | HTML | bar component | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/app/foo.component.ts | TypeScript | import { Component, OnInit, OnDestroy } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
@Component({
selector: 'app-foo',
templateUrl: 'foo.component.html'
})
export class FooComponent implements OnInit, OnDestroy ... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/environments/environment.prod.ts | TypeScript | export const environment = {
production: true
};
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/environments/environment.ts | TypeScript | // This file can be replaced during build by using the `fileReplacements` array.
// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* For easier debugging in development mod... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/index.html | HTML | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>RxjsUnsubscribe</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
</html>
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/karma.conf.js | JavaScript | // Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/main.ts | TypeScript | import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic().bootstrapMod... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/polyfills.ts | TypeScript | /**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/styles.css | CSS | /* You can add global styles to this file, and also import other style files */
| zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
src/test.ts | TypeScript | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare ... | zurfyx/rxjs-unsubscribe | 1 | Always unsubscribe your RxJS calls | TypeScript | zurfyx | Gerard Rovira | facebook |
app/build.gradle | Gradle | apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.zurfyx.travisandroid"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUni... | zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
app/src/androidTest/java/com/zurfyx/travisandroid/ExampleInstrumentedTest.java | Java | package com.zurfyx.travisandroid;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Androi... | zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
app/src/main/java/com/zurfyx/travisandroid/MainActivity.java | Java | package com.zurfyx.travisandroid;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.widget.TextView;
public class MainActivity extends AppCompatAc... | zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
app/src/test/java/com/zurfyx/travisandroid/ExampleUnitTest.java | Java | package com.zurfyx.travisandroid;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public vo... | zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
build.gradle | Gradle | // Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application depende... | zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
scripts/tag.sh | Shell | # Tag last commit as 'latest'.
if [ "$TRAVIS_BRANCH" = "master" -a "$TRAVIS_PULL_REQUEST" = "false" ]; then
git config --global user.email "hi@travis-ci.org"
git config --global user.name "Sr. Travis"
git remote add release "https://${GH_TOKEN}@github.com/zurfyx/travis-android.git"
git push -d release latest... | zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
settings.gradle | Gradle | include ':app'
| zurfyx/travis-android | 2 | Android Travis CI with Autodeploy (API 26+) | Java | zurfyx | Gerard Rovira | facebook |
lib/index.js | JavaScript | /* eslint-disable no-param-reassign */
/* eslint-disable no-bitwise */
/* eslint-disable class-methods-use-this */
const fs = require('fs').promises;
const EventEmitter = require('events');
const whilst = require('async/whilst');
const HID = require('node-hid');
const intelhex = require('intel-hex');
function isBootlo... | zvecr/bootload-hid | 0 | Library for flashing BootloadHID devices | JavaScript | zvecr | Joel Challis | |
test/test.js | JavaScript | /* eslint-disable max-len */
/* eslint-env mocha */
const chai = require('chai');
const sinon = require('sinon');
const mockery = require('mockery');
const EventEmitter = require('events');
const DUMMY_HEX = `:100000000C9420030C9464030C947F030C946403FD
:100010000C9464030C9464030C9464030C946403C4
:100020000C9464030C946... | zvecr/bootload-hid | 0 | Library for flashing BootloadHID devices | JavaScript | zvecr | Joel Challis | |
src/index.js | JavaScript | const { Command, flags } = require('@oclif/command');
const BootloadHID = require('bootload-hid');
class BootloadHIDCli extends Command {
async run() {
const { args, flags: flagz } = this.parse(BootloadHIDCli);
const loader = new BootloadHID({
debug: false,
manualReset: !flagz.leaveBootLoader,
... | zvecr/bootload-hid-cli | 0 | Utility for flashing BootloadHID devices | JavaScript | zvecr | Joel Challis | |
test/test.js | JavaScript | /* eslint-env mocha */
const { expect, test } = require('@oclif/test');
const mockery = require('mockery');
const EventEmitter = require('events');
const ee = new EventEmitter();
class DummyBoot {
constructor(...args) {
ee.args = args;
return ee;
}
}
ee.flash = () => {};
mockery.registerMock('bootload-hid... | zvecr/bootload-hid-cli | 0 | Utility for flashing BootloadHID devices | JavaScript | zvecr | Joel Challis | |
lib/index.js | JavaScript | /* eslint-disable no-underscore-dangle */
/* eslint-disable prefer-destructuring */
/* eslint-disable no-param-reassign */
/* eslint-disable no-bitwise */
const fs = require('fs');
const path = require('path');
const EventEmitter = require('events');
const whilst = require('async/whilst');
const HID = require('node-hi... | zvecr/hid-listen | 1 | Library for acquiring debugging information from usb hid devices | JavaScript | zvecr | Joel Challis | |
test/test.js | JavaScript | /* eslint-env mocha */
const chai = require('chai');
const sinon = require('sinon');
const mockery = require('mockery');
const EventEmitter = require('events');
const mockFs = {
existsSync: sinon.stub(),
readFileSync: sinon.stub(),
};
mockery.registerMock('fs', mockFs);
class DummyHID extends EventEmitter {
}
Du... | zvecr/hid-listen | 1 | Library for acquiring debugging information from usb hid devices | JavaScript | zvecr | Joel Challis | |
src/app.js | JavaScript | import express from 'express';
import bodyParser from 'body-parser';
import helmet from 'helmet';
import compile from './routes/compile';
import sendFileBuffer from './sendFileBuffer';
// environment defaults
const PORT = process.env.PORT || 8080;
// expressjs constants
const app = express();
// middleware config
a... | zvecr/rest-ahk | 0 | Compile service for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/routes/compile.js | JavaScript | import express from 'express';
import expressQueue from 'express-queue';
import mcache from 'memory-cache';
import { promises as fs } from 'fs';
import proc from 'child_process';
import md5 from 'md5';
import del from 'del';
// TODO: convert to import
// const proc = require('child_process');
const CACHE_TIMEOUT = ... | zvecr/rest-ahk | 0 | Compile service for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/sendFileBuffer.js | JavaScript | import { PassThrough } from 'stream';
function sendFileBuffer(req, res, next) {
res.sendFileBuffer = (filename, data) => {
res.setHeader('Content-disposition', `attachment; filename=${filename}`);
res.setHeader('Content-type', 'application/x-msdownload');
const bufferStream = new PassThrough();
buff... | zvecr/rest-ahk | 0 | Compile service for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
test/e2e.js | JavaScript | /* eslint-env mocha */
import chai from 'chai';
import chaiHttp from 'chai-http';
import server from '../src/app';
chai.should();
chai.use(chaiHttp);
describe('IT::Status endpoint', () => {
it('should report zero when idle', (done) => {
chai.request(server).get('/status')
.end((err, res) => {
res.... | zvecr/rest-ahk | 0 | Compile service for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
test/routes/compile.js | JavaScript | /* eslint-env mocha */
import chai from 'chai';
import httpMocks from 'node-mocks-http';
import { promises as fs } from 'fs';
import proc from 'child_process';
import sinon from 'sinon';
import ee from 'events';
import compile from '../../src/routes/compile';
chai.should();
const SCRIPT = `^j::
Send, My First Script
... | zvecr/rest-ahk | 0 | Compile service for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
babel.config.js | JavaScript | module.exports = {
presets: [
'@vue/app',
],
};
| zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
public/index.html | HTML | <!DOCTYPE html>
<html lang="en" style="overflow-y: auto;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Online Drag-and-Drop editor for AutoHotkey scripts">
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/App.vue | Vue | <template>
<v-app>
<app-header/>
<app-menu/>
<app-quick-help/>
<v-content>
<app-editor ref="editor"/>
</v-content>
<app-footer/>
</v-app>
</template>
<script>
import AppEditor from './components/AHK/Editor.vue';
import AppHeader from './components/Header.vue';
import AppMenu from '... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/AHK/Editor.vue | Vue | <template>
<app-blockly :config="config" lang="AHK" ref="blockly" v-model="editorState"/>
</template>
<script>
import { saveAs } from 'file-saver';
import AppBlockly from '../Blockly.vue';
import theme from './theme';
import toolbox from './toolbox';
// Bind AHK support
import './generator';
import './blocks';
ex... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/AHK/blocks.js | JavaScript | import Blockly from 'node-blockly/browser';
const KEYS = [
'F1',
'F2',
'F3',
'F4',
'F5',
'F6',
'F7',
'F8',
'F9',
'F10',
'F11',
'F12',
'F13',
'F14',
'F15',
'F16',
'F17',
'F18',
'F19',
'F20',
'F21',
'F22',
'F23',
'F24',
'!',
'#',
'+',
'^',
'{',
'',
'Enter',
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/AHK/generator.js | JavaScript | /* eslint-disable */
import Blockly from 'node-blockly/browser';
Blockly.AHK = new Blockly.Generator('AHK');
Blockly.AHK.ORDER_ATOMIC = 0;
Blockly.AHK.ORDER_NONE = 99;
Blockly.AHK.scrub_ = function (block, code) {
const nextBlock = block.nextConnection && block.nextConnection.targetBlock();
const nextCode = Bloc... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/AHK/theme.js | JavaScript | import Blockly from 'node-blockly/browser';
const blockStyles = {
rule_type: {
colourPrimary: '#007F7F',
},
detect_type: {
colourPrimary: '#3498db',
},
action_type: {
colourPrimary: '#e67e22',
},
};
const categoryStyles = {
ahk_rule_category: {
colour: '#3498db',
},
ahk_action_catego... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/AHK/toolbox.js | JavaScript | const toolbox = `<xml xmlns="http://www.w3.org/1999/xhtml" id="toolbox" style="display: none;">
<category name="Rules" colour="#3498db" categorystyle="ahk_rule_category">
<block type="ahk_hotkey"></block>
<block type="ahk_detect_keypress">
<field name="KEY">a</field>
</block>
<block type="ahk_detect_mod">
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/Blockly.vue | Vue | <template>
<div class="blocklyDivParent">
<div class="blocklyDiv"/>
</div>
</template>
<script>
import Blockly from 'node-blockly/browser';
export default {
props: {
config: { type: Object, required: true },
lang: { type: String, required: true },
value: { type: String },
},
data() {
ret... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/Footer.vue | Vue | <template>
<v-footer dark padless>
<v-card flat tile width="100%" class="secondary lighten-1 white--text text-center">
<v-card-actions class="secondary justify-center">
© {{ new Date().getFullYear() }} -
<strong>zvecr.com</strong>
</v-card-actions>
</v-card>
</v-f... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/Header.vue | Vue | <template>
<div>
<v-app-bar dark color="primary">
<v-app-bar-nav-icon @click="menu = true"></v-app-bar-nav-icon>
<v-toolbar-title>AutoHotkey Editor</v-toolbar-title>
<div class="flex-grow-1"></div>
<v-btn icon>
<v-icon @click="help = true">fas fa-question</v-icon>
</v-btn>
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/Menu.vue | Vue | <template>
<v-navigation-drawer app temporary v-model="menu" width="300">
<v-layout column fill-height>
<v-list>
<v-list-item link @click="$bus.$emit('import')">
<v-list-item-icon>
<v-icon>fa-file-import</v-icon>
</v-list-item-icon>
<v-list-item-content>
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/components/QuickHelp.vue | Vue | <template>
<v-dialog v-model="help" :width="$vuetify.breakpoint.lgAndUp ? '50%' : 'auto'">
<v-card>
<v-app-bar dark dense color="secondary">
<v-toolbar-title>Quick Help</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon @click="help = false">fa-times</v-icon>
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/main.js | JavaScript | import Vue from 'vue';
import App from './App.vue';
import vuetify from './plugins/vuetify';
import store from './store/Store';
Vue.config.productionTip = false;
Vue.use({
install(_Vue) {
// eslint-disable-next-line no-param-reassign
_Vue.prototype.$bus = new Vue();
Vue.mixin({
beforeDestroy() {
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/plugins/vuetify.js | JavaScript | import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import '@fortawesome/fontawesome-free/css/all.css';
import 'typeface-roboto/index.css';
Vue.use(Vuetify);
export default new Vuetify({
icons: {
iconfont: 'fa',
},
theme: {
dark: false,
themes: {
light: {
primary: '#2C3539',
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
src/store/Store.js | JavaScript | /* eslint-disable no-param-reassign */
import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
menu: false,
help: false,
editor: '',
},
mutations: {
menu(state, val) {
state.menu = val;
},
help(state, val) {
state.help = val;
... | zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
vue.config.js | JavaScript | module.exports = {
publicPath: '/',
};
| zvecr/vue-ahk | 9 | Online Drag-and-Drop editor for AutoHotkey scripts | JavaScript | zvecr | Joel Challis | |
lib/components/RouterLink.js | JavaScript | function findTag(children, tag = 'a') {
let found;
(children || []).forEach((child) => {
if (child.tag === tag) {
found = child;
} else if (child.children) {
found = findTag(child.children);
}
});
return found;
}
export default {
name: 'router-link',
props: {
to: {
type: S... | zvecr/vue-scxml-router | 4 | SCXML state machine vue router | JavaScript | zvecr | Joel Challis | |
lib/components/RouterView.js | JavaScript | export default {
name: 'router-view',
functional: true,
render: (_, { children, parent, data }) => {
const createElement = parent.$createElement;
const route = parent.$route.name;
// TODO: better component creation
const component = parent.$options.components[route];
if (!component) {
r... | zvecr/vue-scxml-router | 4 | SCXML state machine vue router | JavaScript | zvecr | Joel Challis | |
lib/index.js | JavaScript | /* eslint-disable no-underscore-dangle */
import { Machine, interpret } from 'xstate';
import RouterView from './components/RouterView';
import RouterLink from './components/RouterLink';
function convert(data) {
// if (typeof data === 'string') {
// // TODO: parse string with xml2js parseString
// data = { ... | zvecr/vue-scxml-router | 4 | SCXML state machine vue router | JavaScript | zvecr | Joel Challis | |
example/docs/.vuepress/config.js | JavaScript | module.exports = {
locales: {
'/': {
lang: 'en',
},
'/zh/': {
lang: 'zh-CN',
}
},
themeConfig: {
locales: {
'/': {
sidebar: [
'/',
'/foo',
'/bar',
]
},
'/zh/': {
sidebar: [
'/zh/',
'/zh/foo'... | zvecr/vuepress-plugin-i18n-fallback | 0 | Enable fallback of missing/untranslated vuepress content | JavaScript | zvecr | Joel Challis | |
index.js | JavaScript | // Copyright 2022 Joel Challis
// SPDX-License-Identifier: MIT
module.exports = (options = {}, ctx) => ({
name: 'vuepress-plugin-i18n-fallback',
async additionalPages(app) {
if (!app.siteConfig.locales) {
console.log(`WARNING: i18n not configured`);
return [];
}
... | zvecr/vuepress-plugin-i18n-fallback | 0 | Enable fallback of missing/untranslated vuepress content | JavaScript | zvecr | Joel Challis | |
babel.config.js | JavaScript | module.exports = {
presets: [
'@vue/app',
],
};
| zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
public/index.html | HTML | <!DOCTYPE html>
<html lang="en" style="overflow-y: auto;">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="zvecr.com">
<meta name="theme-color" content="#007F... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/App.vue | Vue | <template>
<v-app class="temp">
<app-header @menu="menu = true" />
<app-menu v-model="menu" />
<app-main />
<app-footer />
</v-app>
</template>
<script>
import AppHeader from './components/Header.vue';
import AppMenu from './components/Menu.vue';
import AppMain from './components/Main.vue';
import ... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Footer.vue | Vue | <template>
<v-footer dark padless>
<v-card flat tile width="100%" class="secondary lighten-1 white--text text-center">
<v-card-text flat tile>
<v-btn icon href="https://github.com/zvecr">
<v-icon>fab fa-github</v-icon>
</v-btn>
<v-btn icon href="mailto:info@zvecr.com">
... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Header.vue | Vue | <template>
<v-card class="pa-3 primary white--text">
<v-toolbar dark color="transparent elevation-0">
<v-btn color="secondary" dark href="resume.pdf">
Download Resume
<v-icon right>fas fa-download</v-icon>
</v-btn>
<div class="flex-grow-1"></div>
<v-toolbar-items>
<... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Main.vue | Vue | <template>
<v-content>
<app-statement/>
<app-skills/>
<app-projects/>
</v-content>
</template>
<script>
import AppStatement from './Statement.vue';
import AppProjects from './Projects.vue';
import AppSkills from './Skills.vue';
export default {
components: {
AppStatement,
AppProjects,
Ap... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Menu.vue | Vue | <template>
<v-navigation-drawer right app temporary :value="value" @input="toggle" width="300">
<v-layout column fill-height>
<v-list>
<v-list-item link href="https://zvecr.bigcartel.com">
<v-list-item-icon>
<v-icon>fas fa-shopping-cart</v-icon>
</v-list-item-icon>
... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Projects.vue | Vue | <template>
<v-container fluid grid-list-md class="primary lighten">
<h2 class="text-center white--text">Projects</h2>
<v-layout pt-3 wrap>
<v-flex pa-2 lg4 sm6 xs12 v-for="project in projects" :key="project.name">
<v-card round height="100%" class="flexcard">
<v-card-title class="secon... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Skills.vue | Vue | <template>
<v-container fluid grid-list-md class="primary lighten-2 white--text">
<h2 class="text-center">Skills</h2>
<v-layout
:pt-5="$vuetify.breakpoint.mdAndUp"
:row="$vuetify.breakpoint.mdAndUp"
:column="$vuetify.breakpoint.smAndDown"
wrap
>
<v-flex
xs4 v-for="(sk... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/components/Statement.vue | Vue | <template>
<v-container fluid class="primary lighten-1 white--text text-center">
<v-layout align-center justify-center pa-1>
<v-flex xs4>
<v-avatar size="100%">
<v-img src="headshot.jpg" aspect-ratio="1" contain></v-img>
</v-avatar>
</v-flex>
<v-flex xs8>
<block... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/main.js | JavaScript | import Vue from 'vue';
import App from './App.vue';
import vuetify from './plugins/vuetify';
Vue.config.productionTip = false;
new Vue({
vuetify,
render: (h) => h(App),
}).$mount('#app');
| zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
src/plugins/vuetify.js | JavaScript | import Vue from 'vue';
import Vuetify from 'vuetify/lib';
import '@fortawesome/fontawesome-free/css/all.css';
import 'typeface-roboto-mono/index.css';
Vue.use(Vuetify);
export default new Vuetify({
icons: {
iconfont: 'fa',
},
theme: {
dark: false,
themes: {
light: {
primary: '#2C3539',... | zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
vue.config.js | JavaScript | module.exports = {
publicPath: '/',
};
| zvecr/zvecr.github.io | 0 | Vue | zvecr | Joel Challis | ||
bin/build-umd.js | JavaScript | const fs = require('fs')
const { resolve } = require('path')
const cwd = process.cwd()
function run () {
const pre = `;(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define([], factory);
} else if (typeof module === 'object'... | zxdong262/canvas-shapes-bg | 1 | Draw simple shape moving animation in canvas as webpage background | TypeScript | zxdong262 | ZHAO Xudong |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.