Skip to content

Instantly share code, notes, and snippets.

View ryancheung's full-sized avatar
🌝

Ryan Cheung ryancheung

🌝
  • Earth
View GitHub Profile
From 92900076c55cd35cd8a327bf009cd1f8beebb479 Mon Sep 17 00:00:00 2001
From: ryancheung <ryancheung.go@gmail.com>
Date: Fri, 20 Mar 2020 18:23:38 +0800
Subject: [PATCH] Win64 patch
---
include/freetype/ftimage.h | 6 +++++-
include/freetype/fttypes.h | 24 ++++++++++++++++++++----
2 files changed, 25 insertions(+), 5 deletions(-)
From 11aecbddc1a43c2f90f776630a876e7127d8a654 Mon Sep 17 00:00:00 2001
From: ryancheung <ryancheung.go@gmail.com>
Date: Thu, 27 Feb 2020 17:42:04 +0800
Subject: [PATCH] Win64 patch
---
include/freetype/ftimage.h | 6 +++++-
include/freetype/fttypes.h | 24 ++++++++++++++++++++----
2 files changed, 25 insertions(+), 5 deletions(-)
REPLACE INTO `creature_template` (`entry`, `name`, `subname`, `type`, `family`, `rank`, `modelid1`, `minlevel`, `maxlevel`, `faction_a`, `faction_h`, `scale`, `npcflag`) VALUES
(986761, 'Samuro', 'L70ETC',1,1,3,21665,70,70,35,35,1.5,0),
(986762, 'Chief Thunder-Skins', 'L70ETC',1,1,3,21661,70,70,35,35,1.5,0),
(986763, 'Mai\'Ky', 'L70ETC',1,1,3,21662,70,70,35,35,1.5,0),
(986764, 'Bergrisst', 'L70ETC',1,1,3,21659,70,70,35,35,1.5,0),
(986765, 'Sig Nicious', 'L70ETC',1,1,3,21666,70,70,35,35,1.5,0),
(986766, 'Michael Schweitzer', 'Xzombie',1,1,3,21959,70,70,35,35,1.5,1),
(986767, 'Steven Thomas', 'L70ETC Caster',1,1,3,2139,70,70,35,35,1.5,0),
(986768, 'Steven Thomas', 'L70ETC Caster2',1,1,3,2139,70,70,35,35,1.5,0),
(986769, 'Steven Thomas', 'L70ETC Objecter',1,1,3,2139,70,70,35,35,1.5,0);
@ryancheung
ryancheung / MySQL_5-7_macOS.md
Created December 28, 2019 10:57 — forked from robhrt7/MySQL_5-7_macOS.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
export PS1="\[\e[0;33m\]\u\[\e[m\]@\[\e[0;34m\]\h\[\e[m\]:\w\[\e[0;32m\]\$(__git_ps1 '(%s)')\[\e[m\]\n\[\e[0;35m\]$\[\e[m\] "
export EDITOR=vim
export CLICOLOR=1
# git prompt for Linux
if [ -f /usr/share/git/completion/git-prompt.sh ]; then
. /usr/share/git/completion/git-prompt.sh
fi
@ryancheung
ryancheung / remap-capslock-to-control-win10.md
Created October 22, 2019 08:19 — forked from joshschmelzle/remap-capslock-to-control-win10.md
Remap Caps Lock to Control on Windows 10

Create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

or use PowerShell (run as Admin)

for file in ClientMobile/Content/Sound/**; do git lfs track $file; done
@ryancheung
ryancheung / SkTextBox.cpp
Created July 22, 2019 10:19
SkTextBox cpp implementation
/*
* Copyright 2006 The Android Open Source Project
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include "SkTextBox.h"
#include "SkUtils.h"
// g++ -Wall -O -o sdlgpu-test $(pkg-config SDL2_gpu --cflags) $(sdl2-config --cflags) sdlgpu-test.cc $(pkg-config SDL2_gpu --libs) $(sdl2-config --libs)
#include <SDL_gpu.h>
int main(int argc, char* argv[])
{
GPU_SetDebugLevel(GPU_DEBUG_LEVEL_MAX);
GPU_Target* screen = GPU_Init(400, 300, GPU_DEFAULT_INIT_FLAGS);
if (!screen)
@ryancheung
ryancheung / test.c
Created December 23, 2018 21:46 — forked from incinirate/test.c
Demonstration of slowdown when using BlitRect
#include "SDL.h"
#include "SDL_gpu.h"
#include <stdio.h>
#define WIDTH 280
#define HEIGHT 160
#define SCALE 3
bool running = true;
bool doScale = true;