Skip to content

Instantly share code, notes, and snippets.

@ktownsend-personal
ktownsend-personal / (aspNetCore + classicASP).md
Last active May 12, 2024 20:52
How to host classic ASP with your ASP.NET Core project

Host classic ASP in an ASP.NET Core 8 project

I have a situation where I need to migrate a very old classic ASP website gradually into an ASP.NET Core 8 website.

In my research I found many people asking how but never found a fully working example, so I want to share this for others.

If you end up using any of this, my only ask is that you link to this gist and give me some credit in your code for the next developer to discover... and of course tell me about how it saved your life in the gist comments ☺

Solution Summary:

  • add ISAPI handler in web.config for each file extension to process as classicASP
  • put classicASP files in wwwroot folder of your aspNetCore project
@sergeyklay
sergeyklay / sed-cheatsheet.md
Last active May 12, 2024 20:49
Sed Cheatsheet

Sed Cheat Sheet

Sed command line options

sed [options] sed-command [input-file]
Option Description Example
@perlguy99
perlguy99 / gist:31de4267c31e628cad40f4b69ea49546
Created May 3, 2024 16:07
If Xcode gets stuck at "Preparing iPhone Simulator for Previews"
xcrun simctl --set previews delete all
@fnky
fnky / ANSI.md
Last active May 12, 2024 20:43
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@b0gdanw
b0gdanw / Final Cut Pro Trial DMG
Last active May 12, 2024 20:43
Direct links for Final Cut Pro Trial DMGs
Links from https://www.apple.com/final-cut-pro/trial/
Final Cut Pro release notes https://support.apple.com/en-us/HT201237
What's new in Final Cut Pro https://support.apple.com/en-us/HT207877
Release history https://web.archive.org/web/20221121093911/https://en.wikipedia.org/wiki/Final_Cut_Pro_X#Release_history
Final Cut Pro 10.1.3
https://secure-appldnld.apple.com/Final_Cut_Pro_X/031-05296.20140814.VRR4r/FinalCutProTrial10.1.3.dmg
Final Cut Pro 10.1.4
https://secure-appldnld.apple.com/Final_Cut_Pro_X/031-02980.20141202.Jgt44/FinalCutProTrial10.1.4.dmg
@kasnder
kasnder / grant_ios_location_permission.sh
Last active May 12, 2024 20:41
Grant the location permission to an iOS app. More permissions here: https://gist.github.com/kasnder/3eb32449512a4dba4a92949c8d337a92
#!/bin/bash
# Todo: This currently fails to replace an existing entry in the location permission database. Would be better add to the end of the clients.plist file.
# Usage:./grant_ios_location_permission.sh [bundleId]
# Example: ./grant_ios_location_permission.sh com.spotify.client
# Requirements:
# - iOS device with checkra1n jailbreak (tested on 14.8)
# - Installed `sqlite3` on iOS device from Cydia
@michaeltys
michaeltys / ShareFileToInstagram
Created October 10, 2018 15:13
Sharing an image to instagram stories or create a post
private void shareFileToInstagram(Uri uri, boolean isVideo, Post post) {
Intent feedIntent = new Intent(Intent.ACTION_SEND);
feedIntent.setType(isVideo ? "video/*" : "image/*");
feedIntent.putExtra(Intent.EXTRA_STREAM, uri);
feedIntent.setPackage(Constants.INSTAGRAM_PACKAGE_NAME);
Intent storiesIntent = new Intent("com.instagram.share.ADD_TO_STORY");
storiesIntent.setDataAndType(uri, isVideo ? "mp4" : "jpg");
storiesIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
storiesIntent.setPackage(Constants.INSTAGRAM_PACKAGE_NAME);
@ksafranski
ksafranski / Common-Currency.json
Last active May 12, 2024 20:41
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@wojteklu
wojteklu / clean_code.md
Last active May 12, 2024 20:41
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

1. Photoscissors 6.1 : UAAA-UAYO-AKBA-LAAA-WULP-MAKA-IFHA-CLAF
2. Batch Inpaint 2.2: ZUKA-BACE-GTRD-UCNR-LYDK-TVZG-ORNZ-HUTY
3. DupHunter 2.0: QRRD-ODNY-DJEI-CABC-AIVN-EPTP-DGAT-JSWB
4. FolderIco 6.2.x: FKAA-HAWO-MBRY-FHEV-UKAJ-DYHV-XWWA-PAFP
5. Inpaint 8.0: HWTU-QACW-ELMN-SVGP-AAAI-ITGP-EYPH-CFAP
6. Intelligent Resizer 3.0: EHSP-XUTD-UANB-XBBX-FUAQ-IPAP-UBNK-FFZR
7. NetLimiter 3
Registration name: Peter Raheli
Registration code: C99A2-QSSUD-2CSBG-TSRPN-A2BEB