Skip to content

Instantly share code, notes, and snippets.

@rubyandcoffee
rubyandcoffee / Bootstrap - Rails 7
Last active May 15, 2024 19:03
Bootstrap with Rails 7
Adding Bootstrap to Rails 7
Reference: https://www.linkedin.com/pulse/rails-7-bootstrap-52-importmap-md-habibur-rahman-habib/
INSTRUCTIONS
1. Add the following to Gemfile:
gem "bootstrap"
gem "sassc-rails"

How to Compress Textures for Fivem / GTA 5

Asset textures often need to be resized or the compression method changed. Large Sized Textures cause issues for your players such as the map not loading making them fall through the map or other models not loading either. FXServer will warn you in the console if your YTD files are too large.

If you have issues compressing textures, feel free to comment and I’ll try to get back to you.

How to Setup Photoshop for Use with DDS Files

Best way to keep the quality of the file, you are going to resize is to keep the image in a DDS format (DirectDraw Surface) DDS is a compressed format and thus cannot be opened the same way a PNG or JPEG can.

@jinjier
jinjier / 250.csv
Last active May 15, 2024 19:02
JavDB Top 250 movies code list. [Updated at 2024/02]
1 LAFBD-41
2 SSNI-497
3 ABP-984
4 IPX-580
5 IPX-811
6 IPX-177
7 STARS-804
8 SMBD-115
9 ABP-968
10 ABF-017
@rmascarenhas
rmascarenhas / undo.sh
Created November 16, 2012 02:19
Undoing your last command
# undo: reverts the last command, as long as there is a registered handler
# for it.
#
# Usage:
#
# $ undo
#
# There are no options.
#
# There are by default registered handlers for the following commands:
@Svidro
Svidro / !Classifying objects in QuPath
Last active May 15, 2024 19:01
Classification based groovy scripts for QuPath
Collection of scripts mostly from Pete, but also taken from the forums. Note you can always run a saved classifier using the
runClassifier() command, with the file path included as a string.
TOC
A simple cell classifier.groovy - One way to classify cells.
A simple classifier 2.groovy - Another way.
Annotation Classifications to Name field.groovy - Sets the Name of the annotation to its classification. Useful for applying a second
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 15, 2024 19:02
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@vasanthk
vasanthk / System Design.md
Last active May 15, 2024 18:57
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@sspeery
sspeery / AGOL_Mass_Notification.ipynb
Created February 10, 2022 15:30
ArcGIS Online Mass Notification
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kepano
kepano / obsidian-web-clipper.js
Last active May 15, 2024 18:54
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@dhh
dhh / linux-setup.sh
Last active May 15, 2024 18:53
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils