text
stringlengths
92
5.09M
'use strict'; // config is in non-standard location. setting this env var will direct // node-config to the proper config files. process.env.NODE_CONFIG_DIR = './test/config'; var gulp = require('gulp'); var wiredep = require('wiredep').stream; //var sprite = require('css-sprite').stream; var config = requir...
if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) { module.exports = 'ng-token-auth'; } angular.module('ng-token-auth', ['ipCookie']).provider('$auth', function() { var configs, defaultConfigName; configs = { "default": { apiUrl: '/api', signOutUrl...
require('coffee-script/register'); var os = require('os'); exports.config = { allScriptsTimeout: 30000, sauceUser: process.env.SAUCE_USERNAME, sauceKey: process.env.SAUCE_ACCESS_KEY, specs: [ 'e2e/ng-token-auth/*.coffee' ], chromeOnly: true, capabilities: { 'browserName': 'chrome', 'name':...
var crypto = require('crypto'); // params: dir, key, secret, expiration, bucket, acl, type, redirect module.exports = function(params) { var date = new Date(); var s3Policy = { expiration: params.expiration, conditions: [ ["starts-with", "$key", params.dir], {bucket: params.bucket}, {acl...
process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; var express = require('express'); var request = require('request'); var s3Policy = require('./server/s3'); var sm = require('sitemap'); var os = require('os'); var port = process.env.PORT || 7777; var distDir = '/.tmp'; var app = express(); // ...
#include <stdio.h> int def_in_dyn = 1234; extern int def_in_exec; void dyn_main() { puts("hello from dyn_main()!"); printf("dyn: def_in_exec=%d def_in_dyn=%d\n", def_in_exec, def_in_dyn); def_in_dyn = 2; def_in_exec = 4; printf("dyn: def_in_exec=%d def_in_dyn=%d\n", def_in_exec, def_in_dyn); p...
#include <stdio.h> extern int def_in_dyn; int def_in_exec = 5678; void dyn_main(); int main() { puts("hello from main()!"); printf("exec: def_in_exec=%d def_in_dyn=%d\n", def_in_exec, def_in_dyn); def_in_dyn = 1; def_in_exec = 3; printf("exec: def_in_exec=%d def_in_dyn=%d\n", def_in_exec, def_in_...
#!/usr/bin/env python from setuptools import setup, find_packages import os, runpy pkg_root = os.path.dirname(__file__) __version__ = runpy.run_path( os.path.join(pkg_root, 'onedrive', '__init__.py') )['__version__'] # Error-handling here is to allow package to be built w/o README included try: readme = open(os.pat...
#!/usr/bin/env python #-*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import itertools as it, operator as op, functools as ft import os, sys, re class FormatError(Exception): pass def main(): import argparse parser = argparse.ArgumentParser( description='Convert sphi...
#-*- coding: utf-8 -*- from __future__ import print_function import itertools as it, operator as op, functools as ft from collections import Iterable import os, sys, types, re from sphinx.ext.autodoc import Documenter _autodoc_add_line = Documenter.add_line @ft.wraps(_autodoc_add_line) def autodoc_add_line(self, l...
import sys, os from os.path import abspath, dirname, join doc_root = dirname(__file__) # autodoc_dump_rst = open(join(doc_root, 'autodoc.rst'), 'w') os.chdir(doc_root) sys.path.insert(0, abspath('..')) # for module itself sys.path.append(abspath('.')) # for extensions needs_sphinx = '1.1' extensions = ['sphinx.ext....
#!/usr/bin/env python2 #-*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import itertools as it, operator as op, functools as ft from os.path import dirname, basename, exists, isdir, join, abspath from posixpath import join as ujoin, dirname as udirname, basename as ubasename from collecti...
#-*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import itertools as it, operator as op, functools as ft from datetime import datetime, timedelta from posixpath import join as ujoin # used for url pahs from os.path import join, basename, dirname, exists import os, sys, io, urllib, urlpar...
#-*- coding: utf-8 -*- import os if os.name == 'nt': # Needs pywin32 to work on Windows (NT, 2K, XP, _not_ /95 or /98) try: import win32con, win32file, pywintypes except ImportError as err: raise ImportError( 'Failed to import pywin32' ' extensions (make sure pywin32 is installed correctly) - {}'.format(err)...
#-*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import itertools as it, operator as op, functools as ft import os, sys, io, errno, tempfile, stat, re from os.path import dirname, basename import logging log = logging.getLogger(__name__) class ConfigMixin(object): #: Path to configu...
import { Writable } from "stream"; import { check } from "./blork.js"; /** * Create a stream that passes messages through while rewriting scope. * Replaces `[semantic-release]` with a custom scope (e.g. `[my-awesome-package]`) so output makes more sense. * * @param {stream.Writable} stream The actual stream to wri...
import semanticGetConfig from "semantic-release/lib/get-config.js"; import { WritableStreamBuffer } from "stream-buffers"; import { logger } from "./logger.js"; import signale from "signale"; const { Signale } = signale; /** * Get the release configuration options for a given directory. * Unfortunately we've had to...
import { relative, resolve } from "path"; import gitLogParser from "git-log-parser"; import getStream from "get-stream"; import { execa } from "execa"; import { check, ValueError } from "./blork.js"; import cleanPath from "./cleanPath.js"; import { logger } from "./logger.js"; const { debug } = logger.withScope("msr:c...
/** * Lifted and tweaked from semantic-release because we follow how they bump their packages/dependencies. * https://github.com/semantic-release/semantic-release/blob/master/lib/utils.js */ import semver from "semver"; const { gt, lt, prerelease, rcompare } = semver; /** * Get tag objects and convert them to a l...
import { existsSync, lstatSync, readFileSync } from "fs"; /** * Read the content of target package.json if exists. * * @param {string} path file path * @returns {string} file content * * @internal */ function readManifest(path) { // Check it exists. if (!existsSync(path)) throw new ReferenceError(`package.jso...
import { normalize, isAbsolute, join } from "path"; import { check } from "./blork.js"; /** * Normalize and make a path absolute, optionally using a custom CWD. * Trims any trailing slashes from the path. * * @param {string} path The path to normalize and make absolute. * @param {string} cwd=process.cwd() The CWD...
import { execaSync } from "execa"; /** * Get all the tags for a given branch. * * @param {String} branch The branch for which to retrieve the tags. * @param {Object} [execaOptions] Options to pass to `execa`. * @param {Array<String>} filters List of string to be checked inside tags. * * @return {Array<String>} ...
import getCommitsFiltered from "./getCommitsFiltered.js"; import { updateManifestDeps, resolveReleaseType } from "./updateDeps.js"; import { logger } from "./logger.js"; const { debug } = logger.withScope("msr:inlinePlugin"); /** * Create an inline plugin creator for a multirelease. * This is caused once per multir...
import { writeFileSync } from "fs"; import semver from "semver"; import { isObject, isEqual, transform } from "lodash-es"; import recognizeFormat from "./recognizeFormat.js"; import getManifest from "./getManifest.js"; import { getHighestVersion, getLatestVersion } from "./utils.js"; import { getTags } from "./git.js";...
import semanticRelease from "semantic-release"; import { uniq, template, sortBy } from "lodash-es"; import { topo } from "@semrel-extra/topo"; import { dirname, join } from "path"; import { check } from "./blork.js"; import { logger } from "./logger.js"; import getConfig from "./getConfig.js"; import getConfigMultiSemr...
import dbg from "debug"; import singnale from "signale"; const { Signale } = singnale; const severityOrder = ["error", "warn", "info", "debug", "trace"]; const assertLevel = (level, limit) => severityOrder.indexOf(level) <= severityOrder.indexOf(limit); const aliases = { failure: "error", log: "info", success: "inf...
import { detectNewline } from "detect-newline"; import detectIndent from "detect-indent"; /** * Information about the format of a file. * @typedef FileFormat * @property {string|number} indent Indentation characters * @property {string} trailingWhitespace Trailing whitespace at the end of the file */ /** * Dete...
import resolveFrom from "resolve-from"; import { cosmiconfig } from "cosmiconfig"; import { pickBy, isNil, castArray, uniq } from "lodash-es"; import { createRequire } from "node:module"; /** * @typedef {Object} DepsConfig * @property {'override' | 'satisfy' | 'inherit'} bump * @property {'patch' | 'minor' | 'major...
import { existsSync, lstatSync } from "fs"; import { checker, check, add, ValueError } from "blork"; import { Writable } from "stream"; import { WritableStreamBuffer } from "stream-buffers"; // Get some checkers. const isAbsolute = checker("absolute"); // Add a directory checker. add( "directory", (v) => isAbsolute...
import { cosmiconfig } from "cosmiconfig"; // Copied from get-config.js in semantic-release const CONFIG_NAME = "release"; const CONFIG_FILES = [ "package.json", `.${CONFIG_NAME}rc`, `.${CONFIG_NAME}rc.json`, `.${CONFIG_NAME}rc.yaml`, `.${CONFIG_NAME}rc.yml`, `.${CONFIG_NAME}rc.js`, `.${CONFIG_NAME}rc.cjs`, `$...
#!/usr/bin/env node import meow from "meow"; import process from "process"; import { toPairs, set } from "lodash-es"; import { logger } from "../lib/logger.js"; const cli = meow( ` Usage $ multi-semantic-release Options --dry-run Dry run mode. --debug Output debugging information. --silent Do no...
import { getHighestVersion, getLowestVersion, getLatestVersion, tagsToVersions } from "../../lib/utils.js"; describe("tagsToVersions()", () => { // prettier-ignore const cases = [ [[{version: "1.0.0"}, {version: "1.1.0"}, {version: "1.2.0"}], ["1.0.0", "1.1.0", "1.2.0"]], [[],[]], [undefined, []], [null, []]...
import { readFileSync, writeFileSync } from "fs"; import { createRequire } from "module"; import { jest } from "@jest/globals"; import { WritableStreamBuffer } from "stream-buffers"; import { addPrereleaseToPackageRootConfig, copyDirectory, createNewTestingFiles } from "../helpers/file.js"; import { gitInit, gitAdd, g...
import { temporaryDirectory } from "tempy"; import { WritableStreamBuffer } from "stream-buffers"; import { copyDirectory, createNewTestingFiles } from "../helpers/file.js"; import { gitInit, gitCommitAll, gitInitOrigin, gitPush } from "../helpers/git.js"; import { getTags } from "../../lib/git.js"; import multiSemant...
import cleanPath from "../../lib/cleanPath.js"; // Tests. describe("cleanPath()", () => { test("Relative without CWD", () => { expect(cleanPath("aaa")).toBe(`${process.cwd()}/aaa`); expect(cleanPath("aaa/")).toBe(`${process.cwd()}/aaa`); }); test("Relative with CWD", () => { expect(cleanPath("ccc", "/a/b/"))....
import { resolve } from "path"; import { dirname } from "node:path"; import { fileURLToPath } from "node:url"; import { topo } from "@semrel-extra/topo"; const __dirname = dirname(fileURLToPath(import.meta.url)); const getPackagePaths = async (cwd, ignore = []) => { const workspacesExtra = ignore.map((item) => `!${it...
import { beforeAll, beforeEach, jest } from "@jest/globals"; jest.unstable_mockModule("../../lib/git.js", () => ({ getTags: jest.fn(), })); let resolveReleaseType, resolveNextVersion, getNextVersion, getNextPreVersion, getPreReleaseTag, getVersionFromTag, getTags; beforeAll(async () => { ({ getTags } = await i...
import { resolveReleaseType } from "../../lib/updateDeps.js"; // Tests. describe("resolveReleaseType()", () => { test("Works correctly with no deps", () => { expect(resolveReleaseType({ localDeps: [] })).toBe(undefined); }); test("Works correctly with deps", () => { const pkg1 = { _nextType: "patch", localDeps:...
import { isAbsolute, join } from "path"; import { temporaryDirectory } from "tempy"; import { writeFileSync, mkdirSync } from "fs"; import getCommitsFiltered from "../../lib/getCommitsFiltered.js"; import { gitInit, gitCommitAll } from "../helpers/git.js"; // Tests. describe("getCommitsFiltered()", () => { test("Work...
import getConfig from "../../lib/getConfigMultiSemrel.js"; import { gitInit } from "../helpers/git.js"; import { copyDirectory } from "../helpers/file.js"; // Tests. describe("getConfig()", () => { test("Default options", async () => { const result = await getConfig(process.cwd(), {}); expect(result).toMatchObjec...
import recognizeFormat from "../../lib/recognizeFormat.js"; // Tests. describe("recognizeFormat()", () => { describe("Indentation", () => { test("Normal indentation", () => expect( recognizeFormat(`{ "a": "b", "c": { "d": "e" } }`).indent ).toBe("\t")); test("No indentation", () => expect(recognize...
/** * Lifted and tweaked from semantic-release because we follow how they test their internals. * https://github.com/semantic-release/semantic-release/blob/master/test/helpers/git-utils.js */ import { check } from "blork"; import { temporaryDirectory } from "tempy"; import { execaSync } from "execa"; import fileUrl...
import { basename, join, resolve } from "path"; import { copyFileSync, existsSync, mkdirSync, lstatSync, readdirSync, readFileSync, writeFileSync } from "fs"; // Deep copy a directory. function copyDirectory(source, target) { // Checks. if (!isDirectory(source)) throw new Error("copyDirectory(): source must be an ex...
import { execa } from "execa"; import { dirname, resolve } from "node:path"; import { fileURLToPath } from "node:url"; import { copyDirectory } from "../helpers/file.js"; import { gitInit, gitAdd, gitCommit, gitCommitAll, gitInitOrigin, gitPush, gitTag, gitGetTags, } from "../helpers/git.js"; const __dirname ...
from migen import * from migen.build.generic_platform import * from migen.build.platforms.versaecp55g import Platform from migen.genlib.io import CRG from migen.genlib.cdc import MultiReg from microscope import * from ..gateware.platform.lattice_ecp5 import * from ..gateware.serdes import * from ..gateware.phy import ...
from migen import * from migen.build.generic_platform import * from migen.build.platforms.versaecp55g import Platform from migen.genlib.cdc import MultiReg from migen.genlib.fifo import AsyncFIFO from migen.genlib.fsm import FSM from ..gateware.serdes import * from ..gateware.phy import K, PCIePHYTX from ..gateware.al...
from migen import * __all__ = ['Pads'] class Pads(Module): """ Pad adapter. Provides a common interface to device pads, wrapping either a Migen platform request, or a Glasgow I/O port slice. Construct a pad adapter providing signals, records, or tristate triples; name may be specified expl...
from migen import * from migen.genlib.fsm import * from migen.genlib.cdc import MultiReg __all__ = ['UART', 'uart_bit_cyc'] class UARTBus(Module): """ UART bus. Provides synchronization. """ def __init__(self, pads): self.has_rx = hasattr(pads, "rx_t") if self.has_rx: ...
import unittest from migen import * from ..gateware.serdes import * from ..gateware.serdes import K, D from ..gateware.phy_rx import * from . import simulation_test class PCIePHYRXTestbench(Module): def __init__(self, ratio=1): self.submodules.lane = PCIeSERDESInterface(ratio) self.submodules.phy...
import unittest from migen import * from ..gateware.align import * from . import simulation_test class SymbolSlipTestbench(Module): def __init__(self): self.submodules.dut = SymbolSlip(symbol_size=8, word_size=4, comma=0xaa) class SymbolSlipTestCase(unittest.TestCase): def setUp(self): self...
import unittest from migen import * from ..gateware.debug import * from . import simulation_test class RingLogTestbench(Module): def __init__(self): self.submodules.dut = RingLog(timestamp_width=8, data_width=8, depth=4) def read_out(self): yield self.dut.trigger.eq(1) yield ...
import functools from migen import * __all__ = ["simulation_test"] def simulation_test(case=None, **kwargs): def configure_wrapper(case): @functools.wraps(case) def wrapper(self): if hasattr(self, "configure"): self.configure(self.tb, **kwargs) def setup_w...
import unittest from migen import * from ..gateware.serdes import * from ..gateware.serdes import K, D from ..gateware.phy_tx import * from . import simulation_test class PCIePHYTXTestbench(Module): def __init__(self, ratio=1): self.submodules.lane = PCIeSERDESInterface(ratio) self.submodules.phy...
__all__ = ["ts_layout"] ts_layout = [ ("valid", 1), ("link", [ ("valid", 1), ("number", 8), ]), ("lane", [ ("valid", 1), ("number", 5), ]), ("n_fts", 8), ("rate", [ ("reserved0", 1), ("gen1", 1), ...
from migen import * from .serdes import K, D from .protocol import * from .struct import * __all__ = ["PCIePHYTX"] class PCIePHYTX(Module): def __init__(self, lane): self.e_idle = Signal() self.comma = Signal() self.ts = Record(ts_layout) ### self.submodules.emitt...
from migen import * from migen.genlib.fsm import * from .protocol import * from .phy_rx import * from .phy_tx import * from .debug import RingLog __all__ = ["PCIePHY"] class PCIePHY(Module): def __init__(self, lane, ms_cyc): self.submodules.rx = rx = PCIePHYRX(lane) self.submodules.tx = tx = PC...
from migen import * __all__ = ["SymbolSlip"] class SymbolSlip(Module): """ Symbol slip based comma aligner. Accepts and emits a sequence of words, shifting it such that if a comma symbol is encountered, it is always placed at the start of a word. If the input word contains multiple commas, the beha...
from migen import * __all__ = ["RingLog"] class RingLog(Module): def __init__(self, timestamp_width, data_width, depth): self.width = timestamp_width + data_width self.depth = depth self.data_i = Signal(data_width) self.trigger = Signal() self.time_o = S...
from migen import * from .serdes import K, D from .protocol import * from .struct import * __all__ = ["PCIePHYRX"] class PCIePHYRX(Module): def __init__(self, lane): self.error = Signal() self.comma = Signal() self.ts = Record(ts_layout) ### self.comb += lane.rx_...
from migen import * from .align import SymbolSlip __all__ = ["PCIeSERDESInterface", "PCIeSERDESAligner"] def K(x, y): return (1 << 8) | (y << 5) | x def D(x, y): return (0 << 8) | (y << 5) | x class PCIeSERDESInterface(Module): """ Interface of a single PCIe SERDES pair, connected to a single lane. Uses ...
import os from migen import * from .engine import _ProtocolFSM, _ProtocolEngine _DEBUG = os.getenv("DEBUG_PARSER") class Parser(_ProtocolEngine): def __init__(self, symbol_size, word_size, reset_rule, layout=None): super().__init__(symbol_size, word_size, reset_rule) self.reset = Signal() ...
from collections import namedtuple, defaultdict from migen import * from migen.fhdl.structure import _Value, _Statement from migen.genlib.fsm import _LowerNext, FSM class Memory(_Value): def __init__(self, target): self.target = target class NextMemory(_Statement): def __init__(self, target, value):...
import os from migen import * from .engine import _ProtocolFSM, _ProtocolEngine _DEBUG = os.getenv("DEBUG_EMITTER") class Emitter(_ProtocolEngine): def __init__(self, symbol_size, word_size, reset_rule, layout=None): super().__init__(symbol_size, word_size, reset_rule) self.o = Signal(symbol_s...
from migen import * from migen.genlib.cdc import * from ..serdes import * __all__ = ["LatticeECP5PCIeSERDES"] class LatticeECP5PCIeSERDES(Module): """ Lattice ECP5 DCU configured in PCIe mode. Assumes 100 MHz reference clock on SERDES clock input pair. Uses 1:2 gearing. Receiver Detection runs in TX cl...
// // AppDelegate.swift // KnightTouchBar2000 // // Created by Anthony Da Mota on 08/11/2016. // Copyright © 2016 Anthony Da Mota. All rights reserved. // import Cocoa @NSApplicationMain class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) { ...
// // ViewController.swift // KnightTouchBar2000 // // Created by Anthony Da Mota on 08/11/2016. // Copyright © 2016 Anthony Da Mota. All rights reserved. // import Cocoa class ViewController: NSViewController { @IBOutlet weak var scannerCheckbox: NSButton! @IBOutlet weak var kittCar: NSImageView! l...
// // ToucharBarController.swift // KnightTouchBar2000 // // Created by Anthony Da Mota on 08/11/2016. // Copyright © 2016 Anthony Da Mota. All rights reserved. // import Cocoa @available(OSX 10.12.2, *) fileprivate extension NSTouchBar.CustomizationIdentifier { static let knightTouchBar = NSTouchBar.Cus...
#!/bin/sh set -eux ROOT="$(dirname "$0")" PATH="$PATH:$HOME/.local/bin" error () { echo "ERROR: $@" >&2; exit 1; } cppcheck --error-exitcode=1 \ --enable=warning,performance,portability,unusedFunction,missingInclude \ --suppress=unusedFunction:"$ROOT/src/macros.h" --suppress=missingIncludeSystem \ "$ROO...
#!/bin/bash # If man had changed, rebuild its HTML and push to gh-pages set -eu [ "$GH_PASSWORD" ] || exit 12 head=$(git rev-parse HEAD) git clone -b gh-pages "https://kernc:$GH_PASSWORD@github.com/$GITHUB_REPOSITORY.git" gh-pages groff -wall -mandoc -Thtml doc/xsuspender.1 > gh-pages/xsuspender.1.html cd gh-pages...
#include "events.h" #include <glib.h> #include <libwnck/libwnck.h> #include <sys/param.h> #include <time.h> #include "entry.h" #include "macros.h" void xsus_init_event_handlers () { WnckScreen *screen = wnck_handle_get_default_screen (handle); g_signal_connect (screen, "active-window-changed", ...
#include "entry.h" #include <glib.h> #include <libwnck/libwnck.h> WindowEntry* xsus_window_entry_new (WnckWindow *window, Rule *rule) { WindowEntry *entry = g_malloc (sizeof (WindowEntry)); entry->rule = rule; entry->pid = wnck_window_get_pid (window); entry->xid = wnck_window_...
#include "exec.h" #include <string.h> #include <signal.h> #include <sys/types.h> #include "macros.h" static inline int execute (char **argv, char **envp, char **standard_output) { g_autoptr (GError) err = NULL; gint exit_status = -1; GSpawnFlags flags = G_SPAWN_STDERR_TO_DEV_NULL | ...
#include "xsuspender.h" #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <glib.h> #include <libwnck/libwnck.h> #include "config.h" #include "entry.h" #include "events.h" #include "exec.h" #include "macros.h" #include "rule.h" static GMainLoop *loop; WnckHandle *handle; gboole...
#include "config.h" #include <stdlib.h> #include <glib.h> #include "rule.h" #include "macros.h" static gboolean error_encountered = FALSE; static gboolean is_error (GError **err) { if (g_error_matches (*err, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_INVALID_VALUE)) { g_warning ("Error parsing config: %s", (...
#include "rule.h" #include <glib.h> #include <libwnck/libwnck.h> #include "xsuspender.h" Rule* xsus_rule_copy (Rule *orig) { Rule *rule = g_memdup2 (orig, sizeof (Rule)); // Duplicate strings explicitly rule->needle_wm_name = g_strdup (orig->needle_wm_name); rule->needle_wm_class = g_strdup (orig->n...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
from __future__ import print_function import json import urllib import boto3 import logging, logging.config from botocore.client import Config # Because Step Functions client uses long polling, read timeout has to be > 60 seconds sfn_client_config = Config(connect_timeout=50, read_timeout=70) sfn = boto3.client('step...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # 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...
const path = require("path"); const AwsSamPlugin = require("aws-sam-webpack-plugin"); const awsSamPlugin = new AwsSamPlugin(); module.exports = { // Loads the entry object from the AWS::Serverless::Function resources in your // SAM config. Setting this to a function will entry: () => awsSamPlugin.entry(),...
const AWSXRay = require('aws-xray-sdk') const AWS = AWSXRay.captureAWS(require('aws-sdk')) const DBclient = new AWS.DynamoDB.DocumentClient() const EVBclient = new AWS.EventBridge() var table = process.env.TABLE_NAME var eventBusName = process.env.EVENT_BUS_NAME const resolvers = { Mutation: { updateVac...
const AWSXRay = require('aws-xray-sdk') const AWS = AWSXRay.captureAWS(require('aws-sdk')) const DBclient = new AWS.DynamoDB.DocumentClient() const EVBclient = new AWS.EventBridge() var table = process.env.TABLE_NAME var eventBusName = process.env.EVENT_BUS_NAME const resolvers = { Mutation: { submitVac...
/* eslint-disable no-console */ require("es6-promise").polyfill(); require("isomorphic-fetch"); // eslint-disable-next-line import/no-extraneous-dependencies const Xray = require('aws-xray-sdk') const AWS = Xray.captureAWS(require('aws-sdk')) const AWSAppSyncClient = require("aws-appsync").default; const gql = require(...
module.exports = { mode: 'jit', content: [ './public/**/*.html', './src/**/*.{js,jsx,ts,tsx,vue}', ], theme: { extend: { margin: { '-120': '-500px', } }, }, variants: { extend: { opacity: ['disabled'] }, }, plugins: [], }
const cdk = require('@aws-cdk/core'); const eventbridge = require('@aws-cdk/aws-events'); const targets = require('@aws-cdk/aws-events-targets'); const lambda = require('@aws-cdk/aws-lambda'); const iam = require('@aws-cdk/aws-iam'); const assets = require('@aws-cdk/aws-s3-assets'); const { Duration } = require('@aws-c...
#!/usr/bin/env node const cdk = require('@aws-cdk/core'); const { InfrastructureStack } = require('../lib/infrastructure-stack'); const app = new cdk.App(); new InfrastructureStack(app, 'InfrastructureStack', { /* If you don't specify 'env', this stack will be environment-agnostic. * Account/Region-dependent fea...
/* eslint-disable */ // this is an auto generated file. This will be overwritten export const submitVacationRequest = /* GraphQL */ ` mutation SubmitVacationRequest($input: CreateVacationRequestInput!) { submitVacationRequest(input: $input) { id category description approvalStatus s...
/* eslint-disable */ // this is an auto generated file. This will be overwritten export const onVacationRequestNotification = /* GraphQL */ ` subscription OnVacationRequestNotification($owner: String) { onVacationRequestNotification(owner: $owner) { id category description approvalStatus ...
/* eslint-disable */ // this is an auto generated file. This will be overwritten export const getVacationRequest = /* GraphQL */ ` query GetVacationRequest($id: ID!) { getVacationRequest(id: $id) { id category description approvalStatus startDate endDate approvedBy ...
import { useState, useEffect } from "react"; import { API } from "aws-amplify"; import { listVacationRequests } from "../graphql/queries"; import { updateVacationRequest, deleteVacationRequest, } from "../graphql/mutations"; import AddVacation from "../components/AddVacation"; import moment from "moment"; import Cu...
function People() { return ( <div> <h1>PEOPLE</h1> <p className="font-extralight">Work in progress</p> </div> ) } export default People
function Teams() { return ( <div> <h1>TEAMS</h1> <p className="font-extralight">Work in progress</p> </div> ) } export default Teams
// import { useState, useEffect } from 'react' // import { listCategories } from '../graphql/queries' // import { API } from 'aws-amplify' // import CategoryItem from '../components/CategoryItem' // import AddCategory from '../components/AddCategory' function Settings({emmiter}) { // const [categories, setCategori...
function Profile() { return ( <div> <h1>PROFILE</h1> <p className="font-extralight">Work in progress</p> </div> ) } export default Profile
import "./App.css"; import { PaperAirplaneIcon } from "@heroicons/react/outline"; import NavBar from "./components/NavBar"; import ProfileLink from "./components/ProfileLink"; import { withAuthenticator } from "@aws-amplify/ui-react"; import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom"; impo...
import { useState } from 'react' import { API } from 'aws-amplify' import { createCategory } from '../graphql/mutations' function AddCategory({ emmiter }) { const [name, setName] = useState("") async function addCategory() { const newCategory = { name: name } await API.gr...
import { UserIcon, UserGroupIcon, AdjustmentsIcon, CalendarIcon } from '@heroicons/react/solid' import { Link } from 'react-router-dom' import { useEffect, useState } from 'react' function NavBar({user}) { const [isAdmin, setIsAdmin] = useState(false) useEffect(() => { checkUserRole() }) asy...