Skip to content

Instantly share code, notes, and snippets.

View msjyoo's full-sized avatar

Michael Yoo msjyoo

View GitHub Profile
@msjyoo
msjyoo / keybase.md
Created December 10, 2014 12:24
Keybase Verification

Keybase proof

I hereby claim:

  • I am sekjun9878 on github.
  • I am sekjun9878 (https://keybase.io/sekjun9878) on keybase.
  • I have a public key whose fingerprint is 0913 14BA 4330 9C19 2FA9 E0A5 409D BB63 E375 0CCD

To claim this, I am signing this object:

@msjyoo
msjyoo / erfads
Created December 25, 2014 04:17
phpstorm debug status bookmarklet
javascript:(function() {if(document.cookie.indexOf("XDEBUG_SESSION=PHPSTORM") > -1) {alert("Debugging Is Enabled.");} else {alert("Debugging Is Disabled.");}})()
@msjyoo
msjyoo / spec.md
Last active August 29, 2015 14:21
The public specification of pocketmine-config.

pocketmine-config

This document describes the public specification of pocketmine-config, a YAML defined file to allow for a state based initialisation of a PocketMine server.

File Format

A pocketmine-config file must be in a YAML format, with a file extension of either .yml or .yaml. The first line of a pocketmine-config file must start with a declaration of #pocketmine-config, followed by the YAML standard trible hyphen to denote the start of a YAML file.

Example:

#pocketmine-config
@msjyoo
msjyoo / gist:437c40e3ad4ec279e79a
Created September 7, 2015 14:36
Ubuntu GNOME 15.04 search domain
It appears the ability to do this has been removed from NetworkManager gui but not from NetworkManager itself. The possible ways to fix this are by using the nm-connection-editor gui, or nmcli.
https://ask.fedoraproject.org/en/question/67752/how-do-i-add-a-search-domain-using-networkmanager/
How to make ODAC sound good on Linux:
Stop messing with ALSA, just use PulseAudio. Turning off PulseAudio is a huge pain, and it's just not worth the effort.
Set sampling format to 24 bit, set sampling quality to maximum. No need to mess with ALSA direct hardware bypass, it's a huge waste of time.
There's nothing that can be done with the current mess that is the Linux audio - set PulseAudio to 24 bits and just listen to music normally.
Seriously, any more configuration is a HUGE waste of bloody time. Stick with PulseAudio, set those two options and get on with your life.
# Block Reddit!
127.0.0.1 reddit.com
127.0.0.1 www.reddit.com
127.0.0.1 pay.reddit.com
127.0.0.1 a.reddit.com
127.0.0.1 b.reddit.com
127.0.0.1 c.reddit.com
127.0.0.1 d.reddit.com
127.0.0.1 e.reddit.com
127.0.0.1 f.reddit.com
@msjyoo
msjyoo / list-of-things-php-static-analyser-inspector.md
Last active November 5, 2015 14:14
List of things a PHP Static Analyser / Inspector must accomplish to truly understand the code.
  • Parse all return types of functions through PHPDoc
  • Parse all return types of functions implicitly through return statements. PHPDocs take precedence.
  • Type polymorphism through if, foreach etc. statements

Object Oriented Programming

  • Inheritance constraints verification
  • Inheritance type check
switch(get_class($node))
{
    case Assign::class:
        /** @var Assign $node */
        $var['name'] = $node->var;
        break;
    case Property::class:
        /** @var Property $node */
 $var['name'] = first($node->props);
<?php
namespace test {
$a = 1;
}
namespace test2 {
var_dump($a++);
}
<?php
namespace test {
$a = 1;
}
namespace test2 {
var_dump($a++);
}