Skip to content

Instantly share code, notes, and snippets.

@jrsinclair
jrsinclair / php-full-depth-case-insensitive-file-exists.php
Created July 19, 2013 05:17
PHP Full-depth Case Insensitive file_exists() Function
<?php
/**
* Single level, Case Insensitive File Exists.
*
* Only searches one level deep. Based on
* https://gist.github.com/hubgit/456028
*
* @param string $file The file path to search for.
*
* @return string The path if found, FALSE otherwise.
@tarlen5
tarlen5 / calculate_mean_ap.py
Last active April 20, 2024 05:19
Calculate mean Average Precision (mAP) for a set of ground truth and predicted bounding boxes for a set of images.
"""
author: Timothy C. Arlen
date: 28 Feb 2018
Calculate Mean Average Precision (mAP) for a set of bounding boxes corresponding to specific
image Ids. Usage:
> python calculate_mean_ap.py
Will display a plot of precision vs recall curves at 10 distinct IoU thresholds as well as output
@jarun
jarun / disassemble.md
Last active April 20, 2024 05:14
Guide to disassemble

prerequisites

  • Compile the program in gcc with debug symbols enabled (-g)
  • Do NOT strip the binary
  • To generate assembly code using gcc use the -S option: gcc -S hello.c

utilities

objdump

@sundowndev
sundowndev / GoogleDorking.md
Last active April 20, 2024 05:14
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
@PurpleVibe32
PurpleVibe32 / vmwk17key.txt
Last active April 20, 2024 05:13
Free VMware Workstation Pro 17 full license keys
Install VMWare Workstation PRO 17 (Read it right. PRO!)
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it.
Sub to me on youtube pls - PurpleVibe32
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me.
---
This gist can get off at any time.
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT.
*If you have a problem comment and people will try to help you!
*No virus
@achesco
achesco / generate-mongo-ssl.md
Last active April 20, 2024 05:10
Generate self-signed SSL certificates for MongoDb server and client

CNs are important!!! -days 3650

Make PEM containig a public key certificate and its associated private key

openssl req -newkey rsa:2048 -new -x509 -days 3650 -nodes -subj '/C=US/ST=Massachusetts/L=Bedford/O=Personal/OU=Personal/emailAddress=example@example.com/CN=localhost' -out mongodb-cert.crt -keyout mongodb-cert.key
cat mongodb-cert.key mongodb-cert.crt > mongodb.pem
@gadzhimari
gadzhimari / adobe_cc.md
Created November 22, 2018 11:29
Completely Remove Adobe from your Mac in 2 Steps

Step 1

Download and run the Adobe Creative Cloud Cleaner Tool, their multi-app uninstaller and wipe assistant. Adobe does recommend running individual application uninstallers first, your call. Click the Clean All option.

Step 2

Type a one line command in terminal find ~/ -iname "*adobe*" and it's shows up all files which match pattern.

To remove all files

`sudo rm -rf /Applications/Adobe* /Applications/Utilities/Adobe* /Library/Application\ Support/Adobe /Library/Preferences/com.adobe.* /Library/PrivilegedHelperTools/com.adobe.* /private/var/db/receipts/com.adobe.* ~/Library/Application\ Support/Adobe* ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.adobe* ~/Library/Application\ Support/CrashReporter/Adobe* ~/Library/Caches/Adobe ~/Library/Caches/com.Adobe.* ~/Library/Caches/com.adobe.* ~/Library/Cookies/com.adobe.* ~/Library/Logs/Adobe* ~/Librar

@atheiman
atheiman / buildspec.yml
Last active April 20, 2024 05:03
Simple AWS CodeBuild buildspec.yml for CloudFormation CI/CD
# Lint (cfn-lint) and Package (aws cloudformation package ...) run on templates for all branches.
# Deploy all templates on 'main' branch (stack names will be built from template names).
version: 0.2
phases:
install:
runtime-versions:
python: 3.9
pre_build:
@alienresident
alienresident / video-fix-videos-for-pseudo-streaming.md
Last active April 20, 2024 05:02
How to: Fix pseudo-streaming videos by moving Moov Atom
How to:

Fix pseudo-streaming videos by moving Moov Atom

Relies on some *nix CLI utilities: mediainfo; and qt-faststart (part of ffmpeg). I used homebrew to install them on OS X.

What is pseudo-streaming?

Pseudo streaming is simply a video that can start playing before it's fully dowmloaded. The videos are not streaming but rather progressively downloaded. What's important is that the file metadata (the Moov Atom) is at the start of the file rather than at the end. Usually this is an option set when encoding the file (called quick start or web start). If the files have not been encoded this way you can either re-encode or use a utility to move the Moov Atom. Re-encoding takes much longer than using a utility to move the Moov Atom so here's how to do it.

Steps

First check with mediainfo to see if video 'is streamable':

@tanaikech
tanaikech / submit.md
Created August 17, 2023 05:45
Cooking PDF over Google Apps Script

Cooking PDF over Google Apps Script

Abstract

When PDF file can be managed with Google Apps Script, that will lead to the automation process on cloud. In this report, the method for cooking PDF over Google Apps Script.

Introduction