Skip to content

Instantly share code, notes, and snippets.

View AhmedAbouelkher's full-sized avatar
🎯
Focusing

Ahmed Mahmoud AhmedAbouelkher

🎯
Focusing
View GitHub Profile
@bradtraversy
bradtraversy / laravel_xampp_setup.md
Created April 22, 2022 01:16
Laravel Xampp setup on Mac and Windows

Laravel Xampp Setup (Windows & Mac)

Install Xampp

Install Xampp from https://www.apachefriends.org/index.html

  • Run the Xampp installer and open the Xampp control panel
  • Make sure that you enable the Apache and MySQL services
  • On mac you need to click "Start" on the Home tab, "Enable" on the Network tab and "Mount" on the Location Tab. Click "Explore" on the location tab to open your Xampp/Lampp folder

Install Composer

@bradtraversy
bradtraversy / laravel_valet_setup.md
Last active April 25, 2024 06:41
Laravel Valet install on mac

Laravel Valet Setup (Mac)

This will get you setup with Laravel & Valet on your Mac. Quentin Watt has a good video tutorial on getting setup here as well

Install Homebrew

Go to https://brew.sh/ and copy the command and run in your terminal

It will be something like this...

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@StevenACoffman
StevenACoffman / notes-testing.md
Last active October 27, 2023 10:30
HTTP testing in Go

Goal: Less Badness

  • Enable Quality
  • Enable Maintenance
  • Enable Validation

Testing Terms

  • Stub - an object that provides predefined answers to method calls.
  • Mock - an object on which you set expectations.
  • Fake - an object with limited capabilities (for the purposes of testing), e.g. a fake web service.
@righettod
righettod / ios-detect-screen-capture-and-screen-recording.swift
Created July 17, 2020 08:48
Code to detect when a user perform a screen capture or screen recording of an application in order to prevent it when possible
import UIKit
//Inspired from the code below:
//https://github.com/takashings/ScreenCapturedSample/blob/master/ScreenCapturedSample/ForScreenCapturedViewController.swift
//https://www.hackingwithswift.com/example-code/uikit/how-to-detect-when-the-user-takes-a-screenshot
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
//Define a listener to handle the case when a screen recording is launched
@maitrungduc1410
maitrungduc1410 / create-vod-hls.sh
Last active March 1, 2024 22:29
Bash scripts to create VOD HLS stream with ffmpeg (Extended version)
#!/usr/bin/env bash
START_TIME=$SECONDS
set -e
echo "-----START GENERATING HLS STREAM-----"
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1
# comment/add lines here to control which renditions would be created
renditions=(
@zmts
zmts / docker.md
Last active March 13, 2024 07:21
Docker, TypeScript, Node.js

Docker, TypeScript, Node.js

Preconditions:

  • TS application listening port: 7777
|-- dist
|-- src
|-- .dockerignore
|-- Dockerfile
@GiorgioBertolotti
GiorgioBertolotti / bottom_sheet_fix_status_bar.dart
Created June 27, 2019 07:42
Flutter Modal bottom sheet that supports full screen height
//Flutter Modal Bottom Sheet
//Modified by Giorgio Bertolotti
//Based on https://gist.github.com/crimsonsuv/b25d5ebd04236f9be2aa66accba19446
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:meta/meta.dart';
const Duration _kBottomSheetDuration = const Duration(milliseconds: 200);
@ivanbruel
ivanbruel / NetworkImage.swift
Last active August 16, 2021 06:28
Basic NetworkImage support for SwiftUI via Kingfisher
import SwiftUI
import Kingfisher
import UIKit
public struct NetworkImage: SwiftUI.View {
// swiftlint:disable:next redundant_optional_initialization
@State private var image: UIImage? = nil
public let imageURL: URL?

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@shaneutt
shaneutt / LICENSE
Last active April 30, 2024 02:00
Golang: Demonstrate creating a CA Certificate, and Creating and Signing Certs with the CA
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit