Skip to content

Instantly share code, notes, and snippets.

@hassankhan
hassankhan / gist:4481171
Last active December 10, 2015 19:28
Just messing about :)
if len(me.problems) == 99 and not 'bitch' in me.problems:
me.hit()
#!/usr/bin/env php
<?php
$help = <<<'HELP'
EXAMPLES
./project-phpunit-skelgen.php -s <dir> -o <dir> -b <file>
DESCRIPTION
Recursively find PHP files and run phpunit-skelgen to create unit test skeleton files.
@hassankhan
hassankhan / aws-wishlist-2017.md
Last active December 22, 2017 00:17
AWS Wishlist 2017

Mobile Hub

  • Upload Mobile Hub projects via CLI/SDK
  • Export Mobile Hub projects as CloudFormation stacks

Cognito Identity Pools

  • Allow exporting identity pools

API Gateway

  • Set up custom domains using certs from ACM via CloudFormation
  • Allow retrieving API name using Fn::GetAtt
@hassankhan
hassankhan / aws-wishlist-2018.md
Last active November 17, 2018 02:13
AWS Wishlist 2018

Mobile Hub

  • Allow creating Mobile Hub applications through CloudFormation
  • Export Mobile Hub projects as CloudFormation stacks

Cognito Identity Pools

  • Allow exporting identity pools

API Gateway

  • Allow retrieving API name using Fn::GetAtt
  • Allow retrieving regional distribution names for Custom Domains using Fn::GetAtt
// Type definitions for Grommet
// Project: https://github.com/grommet/grommet
// Definitions by: Ryan C. Collins <https://www.ryancollins.io/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="react" />
declare module "grommet" {
// Components
export import Accordion = Grommet.Accordion;
export import AccordionPanel = Grommet.AccordionPanel;

Keybase proof

I hereby claim:

  • I am hassankhan on github.
  • I am skrawg (https://keybase.io/skrawg) on keybase.
  • I have a public key ASAwKlillIFsrKZQYU3-gWZ8cDfF9R5FY5THLR0bfMtk1go

To claim this, I am signing this object:

@hassankhan
hassankhan / App.tsx
Created November 16, 2024 03:47
Example of a dropcap in React Native/Expo
import { useState } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import ParallaxScrollView from '@/components/ParallaxScrollView';
import { ThemedView } from '@/components/ThemedView';
const Paragraph = ({ dropCap = false, dropCapLines = 3, children }) => {
const [lines, setLines] = useState<string[]>([]);
const [firstLetter, setFirstLetter] = useState<string>();
const [lineHeight, setLineHeight] = useState<number>(16);
const fs = require('fs');
const path = require('path');
const {
AndroidConfig,
WarningAggregator,
withAndroidManifest,
withAppBuildGradle,
withDangerousMod,
} = require('@expo/config-plugins');
@hassankhan
hassankhan / merge-cobertura-reports.mjs
Last active April 14, 2025 12:56
Script that merges Cobertura coverage reports generated by Jest in an Nx monorepo and improves them for use in Azure DevOps
import fs from 'fs/promises';
import { readdirSync, statSync } from 'fs';
import path from 'path';
import { promisify } from 'util';
import { exec as callbackExec } from 'child_process';
const exec = promisify(callbackExec);
const COVERAGE_DIR = path.resolve(process.cwd(), 'coverage');
const OUTPUT_DIR_RELATIVE = 'coverage';
@hassankhan
hassankhan / merge-junit-reports.mjs
Last active April 14, 2025 12:55
Script that merges JUnit test reports generated by Jest in an Nx monorepo and improves them for use in Azure DevOps
#!/usr/bin/env zx
import { $, fs, path } from 'zx';
import { XMLParser, XMLBuilder } from 'fast-xml-parser';
const junitDir = path.resolve(process.cwd(), 'coverage', 'junit');
const mergedOutputFile = path.join(junitDir, 'complete-junit.xml');
try {
const fileExists = await fs.exists(mergedOutputFile);