Skip to content

Instantly share code, notes, and snippets.

View aulisius's full-sized avatar
🏠
Working from home

​Faizaan aulisius

🏠
Working from home
View GitHub Profile
@aulisius
aulisius / README.md
Last active January 25, 2024 04:04
Beagle Programming Language

This is the documentation for Beagle, a hypothetical programming language.

Beagle has scalar primitives.

int number = 0;
double money = 4.694;
bool is_hypothetical = true;
string hello = 'world';
void;
@aulisius
aulisius / readme.md
Created June 20, 2023 08:34
GH Packages Setup

GitHub Packages

GitHub has its own registry for npm packages that is available at https://npm.pkg.github.com/

This guide will explain how to login into it so that you can start installing packages from the registry.

Generating token

Unlike the NPM registry which uses a password login, GitHub registry uses a Personal Access Token (PAT) as the credential.

@aulisius
aulisius / pvm
Last active October 28, 2022 02:48
php version manager
#! node
// Simple node.js based PHP Version Manager
// Tested with v16.17.1
let process = require("process");
let [command = "help", version = ""] = process.argv.slice(2);
let fs = require("fs");
let { execSync } = require("child_process");
if (command === "help") {
@aulisius
aulisius / tailwind-format.js
Created February 24, 2021 09:22
Theo Tailwind v2 Transform
const camelCase = require("lodash/camelCase");
const kebabCase = require("lodash/kebabCase");
const theo = require("theo");
theo.registerFormat("tailwindv2", (result) => {
// "result" is an Immutable.Map
// https://facebook.github.io/immutable-js/
let tailwindTheme = {
textColor: {},
backgroundColor: {},
@aulisius
aulisius / cypress-blink-diff.js
Created August 18, 2020 08:35
Cypress Blink Image Diff Plugin
@aulisius
aulisius / Dockerfile
Last active April 23, 2020 07:41
Setup Confluent Platform Kafka on OpenShift/k8s
FROM confluentinc/cp-server-connect
RUN confluent-hub install debezium/debezium-connector-postgresql:0.10.0 --no-prompt
RUN confluent-hub install debezium/debezium-connector-mysql:1.1.0 --no-prompt
@aulisius
aulisius / widgets.js
Last active April 12, 2020 15:48
how an order is defined
let widgets = [
{
name: "widgetA",
dependencies: [{ endpoint: "endpointA", reloadableActions: ["action 1"] }],
},
{
name: "widgetB",
dependencies: [{ endpoint: "endpointA", reloadableActions: ["action 1"] }],
},
{
@aulisius
aulisius / webpack.config.js
Created April 5, 2019 02:14
DynamicCDNWebpackPlugin with custom resolver for React (CDN as jsDelivr)
const HtmlWebpackPlugin = require("html-webpack-plugin");
const DynamicCdnWebpackPlugin = require("dynamic-cdn-webpack-plugin");
module.exports = {
mode: "production",
plugins: [
new HtmlWebpackPlugin(),
new DynamicCdnWebpackPlugin({
resolver: (packageName, packageVersion, options) => {
let env = options.env || "development";
@aulisius
aulisius / maybe.js
Created January 13, 2019 04:00
Scratchpad
function MaybeN(value) {
if (value.__type__ === "maybe") {
return value;
}
const isEmpty = () => value === undefined || value === null;
let internalMaybe = {};
internalMaybe = {
const Compose = ({ children = () => null, ...chain }) => {
const composedFn = Object.entries(chain).reduce(
(acc, [renderProp, renderFn]) => props =>
renderFn(value => acc({ ...props, [renderProp]: value })),
children
);
return composedFn();
};