Skip to content

Instantly share code, notes, and snippets.

@hyuni
hyuni / gist:7709d2aec20333f25c0e
Created December 31, 2015 16:35 — forked from cridenour/gist:74e7635275331d5afa6b
Setting up Vim as your Go IDE

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@hyuni
hyuni / better-nodejs-require-paths.md
Created January 4, 2016 06:29 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@hyuni
hyuni / tunnelbroker-net.sh
Created January 7, 2016 06:47 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <[email protected]>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x
@hyuni
hyuni / 0_make-v8.md
Created January 7, 2016 12:51 — forked from chitacan/0_make-v8.md
octobersky.js v8 스터디 발표자료

make v8

v8 의 Make 를 분석해 보자.

why we need to hack makefile?

어떤 기술을 응용해 무언가를 만들고자 할 때, 필요한 것 중 하나는 그 기술이 어떻게 구성되어 있는지 확인하는 것. 각각의 구성품들을 살펴보며, 새로운 아이디어를 얻을 수 있다.(레고)

오픈소스의 구성품들은 Makefile에 모두 기술되어 있다.

@hyuni
hyuni / Makefile
Created January 18, 2016 07:17 — forked from kanedo/Makefile
Makefile for Xcode C++ projects
#############################################################
# #
# Generic Makefile for C++ projects #
# Author: Gabriel <[email protected]> #
# Date: 2014-04-18 #
# Version: 1.0 #
# #
#############################################################
@hyuni
hyuni / vlc-buildsystem-fix-xcode-4.3
Created January 18, 2016 07:19 — forked from lfranchi/vlc-buildsystem-fix-xcode-4.3
VLC buildsystem fix for XCode 4.3
diff --git a/contrib/bootstrap b/contrib/bootstrap
index df3dd85..a0a7244 100755
--- a/contrib/bootstrap
+++ b/contrib/bootstrap
@@ -143,15 +143,19 @@ add_make_enabled()
check_macosx_sdk()
{
- [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.5" && OSX_VERSION=10.5
- SDK="/Developer/SDKs/MacOSX${OSX_VERSION}.sdk"
@hyuni
hyuni / PersistentCookieStore.java
Created January 21, 2016 08:48 — forked from franmontiel/PersistentCookieStore.java
A persistent CookieStore implementation for use in Android with HTTPUrlConnection or OkHttp.
/*
* Copyright (c) 2015 Fran Montiel
*
* 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
*
* Unless required by applicable law or agreed to in writing, software
#!/bin/bash
: << '#__REM__'
指定さたライブラリをiOS用にフルオートで作成します。ダウンロード、複数のアーキテクチャのビルドも自動的に行います。デフォルトではi386、x86_64、armv7、armv7s、arm64のアーキテクチャを作成します。
Create a full-auto to iOS for the library specified. I do also builds the architecture download, more than one. Create architecture i386, x86_64, armv7, armv7s, arm64 by default.
#__REM__
TARGET_VERSION="1.3.1"
@hyuni
hyuni / CVPixelBufferUtils.h
Created January 31, 2016 05:20 — forked from cookbrianj/CVPixelBufferUtils.h
vImage helpers
//
// PixelBufferUtils.h
// IRStudio
//
// Created by Brian Cook on 5/30/12.
// Copyright (c) 2012 All rights reserved.
//
#import <Accelerate/Accelerate.h>
#import "BCNeonImageUtils.h"
@hyuni
hyuni / Image.swift
Created January 31, 2016 05:21 — forked from indragiek/Image.swift
vImage_Buffer wrapper
// Copyright © 2015 Indragie Karunaratne. All rights reserved.
import Foundation
import Accelerate
public class Image {
private var buffer: vImage_Buffer
public var size: CGSize {
return vImageBuffer_GetSize(&buffer)