Skip to content

Instantly share code, notes, and snippets.

@Tsunder
Tsunder / readme_oo_EN.md
Last active May 5, 2024 17:02
Elona Omake Overhaul EN changelog (from omake)

Overview

This is a mod for elona_omake (2015/06/20). Please move all files into the same folder elona_omake.exe is in before starting. As not enough testing has been done, please make sure to have a backup ready just in case. In addition, this readme does not list changes featured in omake, so be sure to read through omake's readme as well. "omake_overhaul" was created to implement additional features I wanted to see in omake while not putting burden on the brother who created omake.

Purpose

By modifying extreme difficulty curveballs and associating each gameplay element I aim to bring to more excitement, sense of accomplishment, and immersive experience to the world of Elona.

using mode_t = unsigned int;
using size_t = decltype(sizeof(int));
namespace detail
{
struct invalid_permission_character {};
struct invalid_permission_string_length {};
consteval mode_t from_readable_mode_string(const char * const s)
{
@voidfiles
voidfiles / comments.html
Created February 13, 2014 01:25
Embed the App.net comments widget on your website.
<script src="https://d105v2jof9gtr3.cloudfront.net/embed.js" id='adn-comments'></script>
@dhammack
dhammack / Logistic_Regression.ipynb
Created December 21, 2013 16:45
Logistic Regression. Multiclass (softmax) classification, various nonlinear basis functions, training with gradient descent + momentum, comparisons with sklearn's implementation. Based on Bishop 4.3
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tinrab
tinrab / action.ts
Last active May 5, 2024 17:00
Calling server actions in client form components
'use server';
export const signUpAction = apiAction(
signUpFormSchema,
async (data): Promise<{ }> => {
// ...
},
);
@ayoubzulfiqar
ayoubzulfiqar / folder_structure.md
Created September 5, 2023 06:12
The Folder Structure for Every Golang Project

Go - The Ultimate Folder Structure

Organizing your Go (Golang) project's folder structure can help improve code readability, maintainability, and scalability. While there is no one-size-fits-all structure, here's a common folder structure for a Go project:

project-root/
    ├── cmd/
    │   ├── your-app-name/
    │   │   ├── main.go         # Application entry point
    │   │   └── ...             # Other application-specific files
@tatocaster
tatocaster / RealPathUtil.java
Last active May 5, 2024 16:59
Real Path Utility class for Android, works for all API
public class RealPathUtil {
public static String getRealPath(Context context, Uri fileUri) {
String realPath;
// SDK < API11
if (Build.VERSION.SDK_INT < 11) {
realPath = RealPathUtil.getRealPathFromURI_BelowAPI11(context, fileUri);
}
// SDK >= 11 && SDK < 19
else if (Build.VERSION.SDK_INT < 19) {
@gruber
gruber / Split Tabs to New Window.scpt
Last active May 5, 2024 16:58
An AppleScript for Safari to move all tabs in the frontmost window, from the current tab to the rightmost (last) tab, to a new window.
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
(*
Original script: John Gruber (https://daringfireball.net/linked/2023/12/05/an-applescript-for-safari-split-tabs-to-new-window)
Much more elegant version: Leon Cowle (https://github.com/leoncowle)
Even more elegant version: https://stackoverflow.com/questions/54066100/applescript-to-split-safari-tabs-into-new-window/54089865#54089865
Worth a warning: "moving" tabs with this script doesn't actually move them like
drag-and-drop does. The tabs "moved" by this script will reload in the new window,
@TheCherno
TheCherno / Instrumentor.h
Last active May 5, 2024 16:58
Basic Instrumentation Profiler
//
// Basic instrumentation profiler by Cherno
// Usage: include this header file somewhere in your code (eg. precompiled header), and then use like:
//
// Instrumentor::Get().BeginSession("Session Name"); // Begin session
// {
// InstrumentationTimer timer("Profiled Scope Name"); // Place code like this in scopes you'd like to include in profiling
// // Code
// }
def bin(x, k=0):
d = {0:'000', 1:'001', 2:'010', 3:'011', 4:'100', 5:'101', 6:'110', 7:'111'}
return ''.join([d[int(dig)] for dig in oct(x)]).lstrip('0').zfill(k)