Skip to content

Instantly share code, notes, and snippets.

View nidev's full-sized avatar

Changbeom Yun (Nidev) nidev

View GitHub Profile
@nidev
nidev / dart-9999.ebuild
Created April 18, 2015 06:53
dev-lang/dart-9999 standalone ebuild
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=5
DESCRIPTION="Dart is a cohesive, scalable platform for building apps that run on the web. (Full suite)"
HOMEPAGE="https://www.dartlang.org/"
SRC_URI=""
@nidev
nidev / build.log
Created May 3, 2015 12:58
Rubinius 2.5.3 build error with locale LANG=C and LC_ALL=C
nidev@lrig-hanayo /tmp/rubinius-2.5.3 % rake build
GEN vm/gen/config_variables.h
/home/nidev/.rbenv/versions/1.9.3-p551/bin/ruby vm/codegen/config_vars.rb vm/gen/config_variables.h
/home/nidev/.rbenv/versions/1.9.3-p551/bin/ruby vm/codegen/encoding_extract.rb /tmp/rubinius-2.5.3/vendor/oniguruma vm/gen/encoding_database.cpp
mkdir -p /tmp/rubinius-2.5.3/staging//library/encoding/converter
/home/nidev/.rbenv/versions/1.9.3-p551/bin/ruby vm/codegen/transcoders_extract.rb /tmp/rubinius-2.5.3/vendor/oniguruma/enc/trans vm/gen/transcoder_database.cpp
/home/nidev/.rbenv/versions/1.9.3-p551/bin/ruby vm/codegen/field_extract.rb vm/builtin/basic_object.hpp vm/builtin/object.hpp vm/builtin/integer.hpp vm/builtin/fixnum.hpp vm/builtin/array.hpp vm/builtin/bignum.hpp vm/builtin/executable.hpp vm/builtin/access_variable.hpp vm/builtin/alias.hpp vm/builtin/block_environment.hpp vm/builtin/block_as_method.hpp vm/builtin/byte_array.hpp vm/builtin/io.hpp vm/builtin/channel.hpp vm/builtin/module.hpp vm/builtin/constant_table.hp
@nidev
nidev / test.c
Created May 31, 2015 07:43
The taste of raw struct
#include <stdio.h>
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
typedef struct Node {
int val;
int set;
struct Node *next;
@nidev
nidev / output.log
Created June 2, 2015 08:30
rubysl-resolv : NoMethodError in Resolv#use_ipv6?
[rbitter] Try to reconnect...
An exception occurred running /home/nidev/.rbenv/versions/rbx-2.5.5/bin/rbitter:
undefined method `ip_address_list' on Socket (Class) (NoMethodError)
Backtrace:
Kernel(Class)#ip_address_list (method_missing) at kernel/delta/kernel.rb:78
Resolv::DNS#use_ipv6? at .rbenv/versions/rbx-2.5.5/gems/gems
/rubysl-resolv-2.1.2/lib/rubysl/resolv
@nidev
nidev / platform_util.dart
Last active February 18, 2017 12:58
Provide platform-dependent newline character. This function is not available in Platform class in dart:io package.
// This is also included in https://github.com/nidev/smallservlet
import "dart:io";
class PlatformUtil {
static final _NEWLINE_CRLF = "\r\n";
static final _NEWLINE_LF = "\n";
static String get newLine {
if (Platform.isWindows) {
@nidev
nidev / devilsnest.dart
Created March 24, 2017 13:57
Have you ever imagined array[0.5]? here is the answer
// encoding: utf-8
import "dart:io";
enum ExportDirection {
Integer,
Double
}
class HybridIndex {
final int integer;
@nidev
nidev / itloops.rs
Created April 1, 2017 05:23
It loops!
use std::mem;
use std::ptr;
type Link<T> = *mut DoubleLinkNode<T>;
struct DoubleLinkNode<T> {
prev: Link<T>,
next: Link<T>,
value: T
}
@nidev
nidev / utf8truncate.java
Created April 5, 2017 07:36 — forked from lpar/utf8truncate.java
Truncate a Java string so that its UTF-8 representation will not exceed the specified number of bytes
/**
* Truncate a Java string so that its UTF-8 representation will not
* exceed the specified number of bytes.
*
* For discussion of why you might want to do this, see
* http://lpar.ath0.com/2011/06/07/unicode-alchemy-with-db2/
*/
public static String utf8truncate(String input, int length) {
StringBuffer result = new StringBuffer(length);
int resultlen = 0;

Keybase proof

I hereby claim:

  • I am nidev on github.
  • I am nidev (https://keybase.io/nidev) on keybase.
  • I have a public key whose fingerprint is ED83 C1B8 6873 B6C3 8D29 D74D 7F61 49DC 95D8 798D

To claim this, I am signing this object:

@nidev
nidev / .vimrc
Last active December 3, 2023 18:35
How to use omnisharp-vim with latest omnisharp-roslyn
"All user-dependent configurations are omitted intentionally.
"This gist only includes configurations for omnisharp.
"Original vimrc is available on:
"https://github.com/OmniSharp/omnisharp-vim#example-vimrc
"=========================================================
" **Preparation steps
"1. Install pathogen.vim or preferred plugin manager
"(Will explain procedures with assumption that a user is using pathogen.vim)
" **Main steps