Skip to content

Instantly share code, notes, and snippets.

View fex80's full-sized avatar

Felix Alcala fex80

View GitHub Profile
@fex80
fex80 / acim-helpscout.css
Created November 8, 2023 13:41
Stylesheet for our app-help.acim.org
#fullArticle p img {
height: 60vh;
max-height: 60vh;
width: auto !important;
max-width: auto !important;
text-align: center;
margin-left: auto;
margin-right: auto;
border: 1px solid red;
}
.body {
font-family: Georgia, serif;
}
// Adapted from https://rosettacode.org/wiki/MD5/Implementation#Kotlin
import kotlin.math.*
object MD5 {
private val INIT_A = 0x67452301
private val INIT_B = 0xEFCDAB89L.toInt()
@fex80
fex80 / extract-dlls.bat
Last active March 2, 2021 07:49
Batch file to Extract all DLLs from a Nuget package (nupkg) with Windows cmd batch file
@echo off
REM Extracts all .dll files from nugets in this folder or its subfolders and copies them to a subfolders
REM .
REM Note: Uses .NET 4.5 to unzip the nugets. If this fails, use 7zip or something similar.
REM See http://stackoverflow.com/questions/17546016/how-can-you-zip-or-unzip-from-the-command-prompt-using-only-windows-built-in-ca/26843122#26843122
echo Extracting all dlls from nugets to folder \extracted-dlls
REM %mypath% is where the batch file is located
@fex80
fex80 / gist:10478783
Last active September 30, 2021 13:57
Return a zip file on the fly from a ASP.NET WebApi ApiController
using Ionic.Zip; // from NUGET-Package "DotNetZip"
public HttpResponseMessage AllZipped()
{
using (var zipFile = new ZipFile())
{
// zipFile.AddEntry(...);
// zipFile.AddEntry(...);