Skip to content

Instantly share code, notes, and snippets.

View Zodiase's full-sized avatar

Xingchen Hong Zodiase

View GitHub Profile
@Zodiase
Zodiase / Tutorial.md
Last active December 28, 2020 19:24
How to: Get Eon Ticket for Omega Ruby & Alpha Sapphire on Nintendo 3DS.
  1. Fake a special Wi-Fi access point.
    1. The goal is to disguise your Wi-Fi access point to trick your 3DS into believing that it's in contact with some special Wi-Fi access points.
    2. The following steps are assuming using a Mac computer just because that's what I did. If you have some other devices, the overall process should be similar.
    3. Change the MAC address of your Wi-Fi card.
      1. Write down the original MAC address of the Wi-Fi card so you can restore it later. You could find the MAC address in your system report.
      2. Also find the network interface name of your Wi-Fi card. In my case that's "en1".
      3. Turn on your Wi-Fi so that the Wi-Fi card is powered on.
  2. Open Terminal, run sudo ifconfig en1 ether 4E:53:50:4F:4F:4C to change the MAC address of your Wi-Fi card.
@Zodiase
Zodiase / rootUrlFix.js
Last active March 31, 2016 17:55
Meteor `rootUrl` fix.
/**
* @license
* Copyright 2016 Xingchen Hong
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
@Zodiase
Zodiase / bind_vs_apply
Created February 29, 2016 12:45
Bind beats apply.
// Once bound, apply does nothing.
(function () {console.log(this.bar);}).bind({bar: true}).apply({bar: false});
// Output: true.
@Zodiase
Zodiase / eztest.api.md
Last active February 27, 2016 10:58
This is a light weight tester for NPM.
@Zodiase
Zodiase / es6-abstract-class-example.js
Last active July 18, 2022 11:03
ES6 Abstract Class Example
'use strict';
class Abstract {
// A static abstract method.
static foo() {
if (this === Abstract) {
// Error Type 2. Abstract methods can not be called directly.
throw new TypeError("Can not call static abstract method foo.");
} else if (this.foo === Abstract.foo) {
// Error Type 3. The child has not implemented this method.
throw new TypeError("Please implement static abstract method foo.");
@Zodiase
Zodiase / abs_vs_if.cs
Created February 3, 2016 06:45
Performance comparison between Math.Abs and conditional negation.
using System;
using System.Diagnostics;
namespace CsTests
{
class Program
{
public static void Main (string[] args)
{
Console.WriteLine ("Hello World!");