Skip to content

Instantly share code, notes, and snippets.

View rakisaionji's full-sized avatar
✝️
God bless America.

Raki Saionji rakisaionji

✝️
God bless America.
View GitHub Profile
@aamiaa
aamiaa / RevertNewLayout.md
Last active April 9, 2024 21:30
Revert New Discord Layout

The original snippet no longer works!

On 02/09/2024 at around 8pm UTC, Discord flipped an experiment (2023-09_mobile_redesign_override_toggles) which ignores the layout toggle that this script relied on.

If you want to continue using the old layout, you can either use a modded mobile client (such as Vendetta) to disable that experiment, or downgrade to an old version of the app.

Method 1 - Downgrading (Android)

Tip

Use this one if you want a fast, beginner-friendly solution and don't mind using a version from November 2023

  1. Download version 205.15 of Discord mobile app from ApkMirror
@MeguminSama
MeguminSama / Discord Experiments.js
Last active April 7, 2024 13:15
Discord Experiments.js
let cache; webpackChunkdiscord_app.push([["wp_isdev_patch"], {}, r => cache=r.c]);
var UserStore = Object.values(cache).find(m => m?.exports?.default?.getUser).exports.default;
var actions = Object.values(UserStore._dispatcher._actionHandlers._dependencyGraph.nodes);
var user = UserStore.getCurrentUser();
actions.find(n => n.name === "ExperimentStore").actionHandler.CONNECTION_OPEN({
type: "CONNECTION_OPEN", user: {flags: user.flags |= 1}, experiments: [],
});
actions.find(n => n.name === "DeveloperExperimentStore").actionHandler.CONNECTION_OPEN();
webpackChunkdiscord_app.pop(); user.flags &= ~1; "done";

CockroachDB and Docker Compose

This is the first in a series of tutorials on CockroachDB and Docker Compose

  • Information on CockroachDB can be found here.
  • Information on Docker Compose can be found here
  1. Install Docker Desktop

Because we already have an official CockroachDB docker image, we will use that in our docker-compose.yml file. We recommend you use one of the current tags instead of latest.

@dogtopus
dogtopus / sega-slider.md
Last active April 3, 2024 23:53
SEGA rhythm game slider protocol

SEGA touch slider (837-15275 and 837-15330) protocol

Some of the information are from [this writeup][ja] and some come from original researches.

Logic analyzer captures

[slider_cap.zip (sigrok format)][slider-cap-sigrok]

[slider_cap.zip (original ZeroPlus ALC format)][slider-cap-alc]

@rothgar
rothgar / tmate-compile.sh
Created January 19, 2017 07:03
Compile tmate on centos 7
#!/bin/bash
set -e
yum install -y epel-release
yum makecache
yum install -y @development git cmake ruby zlib-devel openssl-devel libevent-devel ncurses-devel libssh-devel msgpack-devel
git clone https://github.com/nviennot/tmate.git
@paulhayes
paulhayes / DllLoadingAtRuntimeExample.cs
Last active February 21, 2024 14:00
Runtime loading dlls in Unity3d
using System;
using UnityEngine;
public class DllLoadingAtRuntimeExample : MonoBehaviour
{
static IntPtr nativeLibraryPtr;
delegate int MultiplyFloat(float number, float multiplyBy);
delegate void DoSomething(string words);
#include <iostream>
#include <fstream>
#include <memory>
#include <string>
#include <algorithm>
void process_crypt_table(unsigned *crypt_table)
{
for (auto i = 0; i < 227; i++)
{
@kmorcinek
kmorcinek / .gitignore
Last active April 23, 2024 21:36
.gitignore for C# projects
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files