yarn global add nx
# start with an empty monorepo and use nx as the cli (vs angular)
yarn create nx-workspace [monorepo_name] --preset=empty --cli=nx
# start with empty monorepo using yarn package manager and js/ts plugin installed
yarn create nx-workspace --package-manager=yarn --preset=ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Author: Kevin Firko @firxworx (https://firxworx.com) from Bitcurve Systems (https://bitcurve.com) - 2017 | |
# overview: | |
# installs and configures tomcat+mysql and then deploys a java webapp (war file) to a bare | |
# ubuntu 16.04+ (and similar Ubuntu/Debian distros) vagrant box when specified as a shell provisioner | |
# in a Vagrantfile. loading mysql timezone tables and basic postfix smtp config included. | |
# this script should also work on other ubuntu versions and debian boxes with minimal modification |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib | |
import shutil | |
import re | |
from pathlib import Path | |
from bs4 import BeautifulSoup | |
# target page containing links to the image files | |
target_page = 'http://example.ca/image_links.php' | |
# local path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// the zendesk php api (https://github.com/zendesk/zendesk_api_client_php) docs do not include | |
// examples for setting custom fields or multiple custom fields when creating a ticket. | |
// so here are a couple that work | |
// NOTE: to create fields in Zendesk UI: | |
// Admin (gear icon) -> "Ticket Fields" link in nav under 'Manage' heading -> Add Field | |
// the Custom Field ID (required for API call) is displayed at at the top of the field's edit page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# The following Apache .htaccess snippet should be included at the top of the .htaccess file in WordPress' root directory. | |
# | |
# Use this option only if you wish to manually modify the .htaccess file. To fully contain file restriction functionality | |
# inside a plugin you can use the mod_rewrite_rules filter as demonstrated in a commented-out block in plugin-snippet.php | |
# | |
# Note <IfModule mod_rewrite.c></IfModule> test is intentionally omitted to trigger an error if mod_rewrite is not available. | |
# BEGIN RestrictFileExample | |
# it is ok if WordPress also calls these two directives later on in the file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create a new local WordPress development site on MacOS | |
# This script is intended for users who have configured MacOS Apache + a DNS server such as dnsmasq to automatically | |
# serve up folders created in a special directory with the URL pattern: "http://FOLDER_NAME.test" | |
# | |
# See my blog for how to set that up: | |
# https://firxworx.com/blog/it-devops/sysadmin/setting-up-a-local-development-environment-on-macos-for-lamp-wordpress-projects/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Test, TestingModule } from '@nestjs/testing' | |
import { INestApplication, LoggerService } from '@nestjs/common' | |
import * as request from 'supertest' | |
import { AppModule } from './../src/app.module' | |
class TestLogger implements LoggerService { | |
log(message: string) {} | |
error(message: string, trace: string) {} | |
warn(message: string) {} | |
debug(message: string) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
charset = utf-8 | |
end_of_line = lf | |
insert_final_newline = true | |
trim_trailing_whitespace = true | |
[*.{js,jsx,ts,tsx,json,yml,yaml,xml,html,css,sass,scss,less}] | |
indent_size = 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this gist is meant to serve as a reminder for common tailwindcss configuration options. | |
// it features comments that are applicable to a range of projects from react to wordpress themes | |
// the palette and specific settings are for example purposes -- this file is not meant to be production-ready :) | |
// importing the default theme is useful for referencing it and building on it | |
const defaultTheme = require('tailwindcss/defaultTheme') | |
// the `plugin()` function is useful for a variety of purposes @see https://tailwindcss.com/docs/plugins | |
// for example, new styles can be added to one of tailwind's layers with project-specific class names |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/** | |
* Minimal implementation of an AWS 'Lambda@Edge' solution for rewriting a request URI. | |
* | |
* This Edge Lambda can support static sites + front-end apps hosted on AWS via S3 + CloudFront CDN, | |
* including those built by popular frameworks such as NextJS (e.g. via NextJS' `next export` static HTML export feature). | |
* | |
* An Edge Lambda provides control and can help meet real-world requirements that arise in the development of non-trivial | |
* front-end web applications, e.g. involving headers, with query strings, etc. that may not be supported (or at least |
OlderNewer