Skip to content

Instantly share code, notes, and snippets.

View yellowberryHN's full-sized avatar
🖐️
i like ya cut g

Zsolt Zitting yellowberryHN

🖐️
i like ya cut g
View GitHub Profile
@cdmwebs
cdmwebs / friendly_urls.markdown
Created September 11, 2011 15:50 — forked from jcasimir/friendly_urls.markdown
Friendly URLs in Rails

Friendly URLs

By default, Rails applications build URLs based on the primary key -- the id column from the database. Imagine we have a Person model and associated controller. We have a person record for Bob Martin that has id number 6. The URL for his show page would be:

/people/6

But, for aesthetic or SEO purposes, we want Bob's name in the URL. The last segment, the 6 here, is called the "slug". Let's look at a few ways to implement better slugs.

@phaedryx
phaedryx / chaos.rb
Last active December 21, 2022 23:10
errors = [
SystemStackError, LocalJumpError, IOError, RegexpError, ZeroDivisionError,
ThreadError, SystemCallError, SecurityError, RuntimeError, NameError,
RangeError, IndexError, ArgumentError, TypeError
]
module Kernel
def suppress_warnings
original_verbosity = $VERBOSE
$VERBOSE = nil
@statico
statico / gpu.cpp
Last active January 25, 2024 01:06
Trick to tell AMD and Nvidia drivers to use the most powerful GPU instead of a lower-performance (such as integrated) GPU
#ifdef _WIN32
// Use discrete GPU by default.
extern "C" {
// http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// http://developer.amd.com/community/blog/2015/10/02/amd-enduro-system-for-developers/
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#endif

Type Asset:

  {
    "id": 123123123123,
    "name": "asset_key",
    "type": 1
  }
  • ID: The ID of the asset
@bgulla
bgulla / honeypot_counts.txt
Last active February 16, 2024 17:31
Passwords attempted over a 5-day period on a PORT 22 ssh honeypot.
204 password
193 123456
144 admin
125 support
116 123
114 1234
105 default
99 12345
97 1
84 ubnt
@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active April 25, 2024 04:03
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
--[[----------------------------------------------------------------------------
MessagePack encoder / decoder written in pure Lua 5.3
written by Sebastian Steinhauer <s.steinhauer@yahoo.de>
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
@Jed-
Jed- / README.md
Last active September 9, 2022 00:30
Sending maps outside of coop edit

Sending maps outside of coop edit

Sometimes it would be useful if a server were able to send a custom map to its clients, in modes different from coop edit. Sendmap/getmap operations are usually blocked in such modes, both server-side and client-side. However, most other map editing messages are allowed (clients cannot send them, but they can receive and parse them). Here, I will provide a method for sending custom maps using a sequence of allowed messages.

We are going to build a modded client capable of exporting a map into a custom file format, which the server will then read and use to send data to its clients. ogz files cannot be sent directly.

Notes

@yellowberryHN
yellowberryHN / BBT-nocd.md
Created January 12, 2022 11:08
Big Biz Tycoon/Venture Tycoon No-CD Patch

Instructions

Using a hex editor of your choice, edit the BBT.exe/VT.exe file, and look for the following bytes:

FF FF FF 85 C0 6A 01 7D

Replace it with the following bytes:

FF FF FF 85 C0 6A 01 EB