Skip to content

Instantly share code, notes, and snippets.

package main
import (
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
)
type Query struct {
package main
import (
"fmt"
)
func request(req <-chan string, reqResult chan<- bool) {
str := <-req
fmt.Println("%v", str)
reqResult <- true
package main
import (
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
)
type Query struct {
@minsOne
minsOne / gist:6997d9c685395025778a
Last active August 29, 2015 14:21
SourceTree alias
echo "alias sourcetree='open -a SourceTree'" >> ~/.zshrc
source ~/.zshrc
sourcetree [Repository Path]
@minsOne
minsOne / gist:7b31c0aa8f76b9a4f758
Last active August 29, 2015 14:21
open sourcetree
open -a SourceTree [Repository Path]
git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
git lg
git lg -p
@minsOne
minsOne / resize.py
Last active January 11, 2016 07:22
resizing app icon script
#!/usr/bin/env python3
# vim:set sw=4 et smarttab:
from PIL import Image
import os, sys, json
iPhoneIconList = [
{'size':(40,40), 'name':'Icon-40', 'scale':1, 'idiom':['ipad']}
,{'size':(80,80), 'name':'Icon-40@2x', 'scale':2, 'idiom':['iphone', 'ipad']}
,{'size':(120,120), 'name':'Icon-40@3x', 'scale':3, 'idiom':['iphone']}
@minsOne
minsOne / LongPressedExample.swift
Last active October 6, 2015 18:11
특정 뷰를 일정시간 동안 눌렀을 경우 동작하도록 하는 코드
//
// ViewController.swift
// ViewTest
//
// Created by JungMin Ahn on 2015. 5. 20..
// Copyright (c) 2015년 JungMin Ahn. All rights reserved.
//
import UIKit
http://old.haxe.org/ref/oop?version=14253
Helper Classes
In Haxe, it is possible to have more than one class definition per class file:
// both definitions in Foo.hx
class Foo { ... }
class FooHelper { ... }
This is fairly common in many object oriented languages such as Java. However, unlike other such languages, Haxe also allows for these internal helper classes to be publicly available outside of the main class. By importing the main class, the helper class becomes available:
//
// ViewController.swift
// asyncalertview
//
// Created by JungMin Ahn on 2015. 7. 12..
// Copyright (c) 2015년 JungMin Ahn. All rights reserved.
//
import UIKit