Skip to content

Instantly share code, notes, and snippets.

@deltheil
deltheil / gist:2916633
Created June 12, 2012 09:54
JPEG images: EXIF orientation
# 1/ Read EXIF orientation flag
identify -format "%[EXIF:orientation]" myimage.jpg
# NOTE: jhead can be used too
# see http://www.sentex.net/~mwandel/jhead/
jhead -exifmap myimage.jpg | grep Ori
# 2/ Remove EXIF orientation
# i.e. rotate the image accordingly and reset the orientation
# flag to 1 (default, i.e. origin = TopLeft)
@IMLaoJI
IMLaoJI / LLM.md
Created May 21, 2024 09:33 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@rain-1
rain-1 / LLM.md
Last active May 21, 2024 09:33
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@icedterminal
icedterminal / vmxfile.md
Last active May 21, 2024 09:30
Hide VM status in guest OS (VMWare)

Hide VM Identification in VMWare (Stealthy)

Tested using WorkStation Pro 16.x, Windows host and guest in UEFI mode, using an Intel CPU.

  1. Create a Windows 10 VM.
  2. Edit VM settings Processor section. Enable (tick) these:
    • Virtualize Intel VT-x/AMD-V
    • Virtualize CPU Performance Counters
    • Virtualize IOMMU
  3. Install Windows 10 in VM.
@owaiswiz
owaiswiz / print_redundant_indexes.rb
Last active May 21, 2024 09:27
Print redundant indexes in a Rails app.
# Unnecessary indexes slows down writes and consumes additional storage and memory.
# Just paste this snippet in your Rails console (bundle exec rails c).
# And it will print all redundant indexes that are already covered by another index on the table:
# Table `pages`: index `site_idx` (site_id) already covered by `site_slug_idx` (site_id,slug)
# Table `optins`: index `list_idx` (list_id) already covered by `list_active_idx` (list_id,active)
ActiveRecord::Base.connection.tables.map do |table|
indexes = ActiveRecord::Base.connection.indexes(table).select(&:valid).reject(&:where)
@willurd
willurd / web-servers.md
Last active May 21, 2024 09:23
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000

This page is a curated collection of Jupyter/IPython notebooks that are notable for some reason. Feel free to add new content here, but please try to only include links to notebooks that include interesting visual or technical content; this should not simply be a dump of a Google search on every ipynb file out there.

Important contribution instructions: If you add new content, please ensure that for any notebook you link to, the link is to the rendered version using nbviewer, rather than the raw file. Simply paste the notebook URL in the nbviewer box and copy the resulting URL of the rendered version. This will make it much easier for visitors to be able to immediately access the new content.

Note that Matt Davis has conveniently written a set of bookmarklets and extensions to make it a one-click affair to load a Notebook URL into your browser of choice, directly opening into nbviewer.

@VirtualHorror
VirtualHorror / certrenewal.sh
Created April 9, 2023 21:43
Bash script for automated OpenVPN SSL certificate renewal on Ubuntu
#!/bin/bash
# IMPORTANT: Make sure your VM's network security rules allows access over TCP Port 80.
# This is required to pass the HTTP challenge.
# NOTE: This script only needs to be run once. No cron setup is necessary for SSL certificate renewal since it will be handled automatically.
# Download: curl -o certrenewal.sh <raw URL of this gist>
# Enable execution: sudo chmod +x certrenewal.sh
# Run: ./certrenewal.sh -d "yourdomain.tld" -e "youremail@yourdomain.tld"
@0xdevalias
0xdevalias / chatgpt-reverse-engineering-and-deep-dive-code-exploration.md
Last active May 21, 2024 09:16
Notes on reverse engineering ChatGPT's frontend web app + deep dive explorations of the code
@TechRancher
TechRancher / Basic Ubuntu Commands.md
Last active May 21, 2024 09:14
Ubuntu 18.04 Terminal Commands

Basic Ubuntu Commands

This is a list of the most basic but extremely useful commands. Learning these will help you have a strong foundation to add more sophisticated commands upon.

Here are some words that we use and some meanings that you may associate them with.

We use What you may know them as
directory folder
sudo Run as Administor