Skip to content

Instantly share code, notes, and snippets.

View mshwf's full-sized avatar
🎯
Focusing

Mohamed El-Shawaf mshwf

🎯
Focusing
View GitHub Profile
@davidfowl
davidfowl / dotnetlayout.md
Last active May 7, 2024 16:39
.NET project structure
$/
  artifacts/
  build/
  docs/
  lib/
  packages/
  samples/
  src/
 tests/
@DanDiplo
DanDiplo / JS-LINQ.js
Last active May 7, 2024 14:27
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// JS array equivalents to C# LINQ methods - by Dan B.
// First: This version using older JavaScript notation for universal browser support (scroll down for ES6 version):
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active May 6, 2024 08:45
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@dreikanter
dreikanter / encrypt_openssl.md
Last active May 2, 2024 12:55 — forked from crazybyte/encrypt_openssl.txt
File encryption using OpenSSL

Symmetic encryption

For symmetic encryption, you can use the following:

To encrypt:

openssl aes-256-cbc -salt -a -e -in plaintext.txt -out encrypted.txt

To decrypt:

@jeroen-meijer
jeroen-meijer / fluttercleanrecursive.sh
Created September 15, 2019 13:00
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script:
# sh ./fluttercleanrecursive.sh
# or
# sudo sh fluttercleanrecursive.sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
@chad3814
chad3814 / gist:2924672
Last active January 16, 2024 20:27
deleting array items in javascript with forEach() and splice()
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561
/*
* How to delete items from an Array in JavaScript, an exhaustive guide
*/
// DON'T use the delete operator, it leaves a hole in the array:
var arr = [4, 5, 6];
delete arr[1]; // arr now: [4, undefined, 6]
@chrismessina
chrismessina / clubhouse_api.txt
Last active September 24, 2023 10:24
Clubhouse API methods
# source: https://theori.io/research/korean/analyzing-clubhouse/
record_action_trails
start_phone_number_auth
call_phone_number_auth
resend_phone_number_auth
complete_phone_number_auth
check_waitlist_status
get_release_notes
get_all_topics
@ChristianWeyer
ChristianWeyer / MimeTypeLookup.cs
Last active July 13, 2023 09:17
.NET MIME type lookup - 1200 well known MIME types in a C# helper class - thx to https://github.com/PawelGerr !
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
/*
MIT License
Copyright (c) 2014 Christian Weyer