Skip to content

Instantly share code, notes, and snippets.

View ahmaddzidan's full-sized avatar

Ahmad Sanusi ahmaddzidan

View GitHub Profile
# Couldn't figure out how to do /s or get VS Code to search over newlines so came up with this convoluted mess '[\S\s]*?\n?' that matches all characters plus newlines
Search for: <(table|tr|td|p|div|span)[\S\s]*?\n?>
Replace with: <$1>
@ahmaddzidan
ahmaddzidan / README.md
Created March 16, 2022 09:13 — forked from dalezak/README.md
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@ahmaddzidan
ahmaddzidan / strip_fontawesome_classes.js
Created March 5, 2022 05:02 — forked from Windmolders/strip_fontawesome_classes.js
Strips all fontawesome class names from their website to an array. This was used to generate a config array for https://github.com/victor-valencia/bootstrap-iconpicker
// Needs to be executed in the browser console on every tab of the (pro) cheatsheet of Fontawesome: https://fontawesome.com/cheatsheet/pro
// Once you have executed the code on all the tabs (solid,regular,light,duotone,brands) it will output you an array of all full classnames
var groups = {};
var sections = document.getElementsByClassName('cheatsheet-set');
var cookieName = "";
var names = [];
@ahmaddzidan
ahmaddzidan / Response.php
Created October 10, 2021 09:07 — forked from jeffochoa/Response.php
Laravel HTTP status code
<?php
// This can be found in the Symfony\Component\HttpFoundation\Response class
const HTTP_CONTINUE = 100;
const HTTP_SWITCHING_PROTOCOLS = 101;
const HTTP_PROCESSING = 102; // RFC2518
const HTTP_OK = 200;
const HTTP_CREATED = 201;
const HTTP_ACCEPTED = 202;