Skip to content

Instantly share code, notes, and snippets.

View goyusia's full-sized avatar
💭
I may be slow to respond.

byunghoo.yu goyusia

💭
I may be slow to respond.
View GitHub Profile
@goyusia
goyusia / million_park_geun_hye.py
Created January 27, 2016 02:39
확산선 밀리언 ㄹ혜
#!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
pip install requests
"""
import urllib
import requests
@goyusia
goyusia / buggy_ruby_parallel.rb
Created February 17, 2016 06:23
buggy ruby parallel example
#!/usr/bin/env ruby
require "parallel"
class User
attr_accessor :name
def initialize(name)
@name = name
end
end

Keybase proof

I hereby claim:

  • I am if1live on github.
  • I am if1live (https://keybase.io/if1live) on keybase.
  • I have a public key whose fingerprint is 24A1 67F1 AD41 EC41 1938 CEE8 FE22 879B 7E79 AFE3

To claim this, I am signing this object:

@goyusia
goyusia / test_format_null.c
Created March 6, 2016 06:00
printf(%s) with null pointer
/*
printf(%s) with null pointer
## Execute
$ clang test_format_null.c && ./a.out
## Output
### OSX
|(null)||(nu|
@goyusia
goyusia / use_after_delete.cpp
Created March 14, 2016 02:03
use after delete
#include <string>
#include <cstring>
class BrokenMemory {
public:
static BrokenMemory *Get();
public:
BrokenMemory() : data_("EPIC FAIL") {}
const char *data() const { return data_.data(); }
private:
@goyusia
goyusia / contradiction.pl
Last active May 31, 2016 14:35
맞는 말은 하나입니다. 그것을 골라주세요 - prolog version
/*
https://twitter.com/k2pa00/status/737300123332419585
execute
$ gprolog
['contradiction.pl'].
sol_a(A, B, C, D).
sol_b(A, B, C, D).
sol_c(A, B, C, D).
sol_d(A, B, C, D).
@goyusia
goyusia / EffectGizmo.cs
Created October 5, 2016 03:05
EffectGizmo
using UnityEngine;
namespace Assets.GameExternal.Scripts {
public class EffectGizmo : MonoBehaviour {
public enum Types {
Sphere,
DirectionX,
DirectionY,
DirectionZ,
}
@goyusia
goyusia / Twitter Cramming.user.js
Last active November 10, 2017 17:19 — forked from Prof9/Readme.md
Force enable cramming (280 character tweets) on Twitter. NOTE: Stops working when you switch pages, refresh to fix. https://twitter.com/Prof9/status/912859110776950784
// ==UserScript==
// @name Twitter Cramming
// @description Force enable cramming (280 character tweets) on Twitter
// @author Prof. 9
// @version 0.2
// @match https://twitter.com/*
// @run-at document-idle
// @namespace prof9.twittercramming
// ==/UserScript==
@goyusia
goyusia / touchpad-enable.sh
Created October 5, 2017 09:33
Enable/Disable/Toggle Touchpad (For Acer R11 Chromebook)
#!/bin/bash
LOG_FILE=/tmp/touchpad-enable-log
XINPUT_ID=`xinput list|grep Touchpad|awk '{print $5}'|cut --delimiter="=" -f 2`
function enable_touchpad() {
#/usr/bin/synclient TouchpadOff=0
xinput --enable $XINPUT_ID
echo "touchpad_enable\t:`date`" >> $LOG_FILE
}
@goyusia
goyusia / loop.cpp
Last active October 14, 2017 06:56
use stack address as loop ounter
#include <stdio.h>
void execute(int n, int total) {
printf("loop count : %d/%d\n", n, total);
}
int loop_core(int *root_addr, int *prev_addr, int num) {
int base_value = 0;