Skip to content

Instantly share code, notes, and snippets.

View robincher's full-sized avatar

Robin Cher robincher

View GitHub Profile
@quinnjr
quinnjr / README.md
Last active July 31, 2025 19:03
How to easily add environment variables to an Angular application

How to easily add environment variables to an Angular application

This guide assumes that you already have an angular application set up by ng create and are using Angular CLI for compilation.

Other guides that I've read rely upon re-writing your environments/environment.ts|environment.prod.ts files with each compilation. I find this to be completely unnecessary when angular's internal use of webpack can just be extended to include environment variables.

1. Add @angular-builders/custom-webpack to your dev-dependencies

@samloh84
samloh84 / .azurerc
Created July 6, 2020 02:57
.azurerc
#!/bin/bash
ARM_TENANT_ID="${ARM_TENANT_ID:-}"
ARM_SUBSCRIPTION_ID="${ARM_SUBSCRIPTION_ID:-}"
ARM_SERVICE_PRINCIPAL_CREDENTIALS_PATH="${HOME}/.azure/terraform_service_principal_credentials.json"
AZURE_LOGGED_IN=0
AZURE_ACCESS_TOKEN=$(az account get-access-token --subscription "${ARM_SUBSCRIPTION_ID}")
@andrewpetrochenkov
andrewpetrochenkov / mac-squid.sh
Last active August 26, 2025 10:54
squid macos #squid
brew install squid
brew link --force squid
sudo ln -fs /opt/homebrew/opt/squid/sbin/squid /usr/local/bin/squid
sudo ln -fs /opt/homebrew/Cellar/squid/6.11/libexec/security_file_certgen /usr/local/bin/security_file_certgen
find /opt/homebrew -name "security_file_certgen" 2>/dev/null
# /opt/homebrew/Cellar/squid/6.11/libexec/security_file_certgen
sudo mkdir -p /usr/local/etc/squid/ssl_cert
@hguerrero
hguerrero / kong.yml
Created March 13, 2025 15:47
Kong tech enablement for 3.10 demos config
_format_version: "3.0"
_transform: true
services:
- name: request_callout
url: https://echo-api.3scale.net/
routes:
- name: request_callout
hosts:
- callout.dev
@gszr
gszr / callout.json
Created August 6, 2025 15:19
Callout body via Lua code
{
"name": "request-callout",
"config": {
"callouts": [
{
"name": "c1",
"request": {
"url": "https://httpbin.org/anything",
"method": "POST",
"body": {