Skip to content

Instantly share code, notes, and snippets.

Tkc tkc

  • Japan
Block or report user

Report or block tkc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View UILabelLifeCycle
class CustomLabel: UILabel {
override func willMoveToSuperview(newSuperview: UIView?) {
print("willMoveToSuperview")
}
override func didMoveToSuperview() {
print("didMoveToSuperview")
}
View CustomeCellDelegate
protocol TouchCellDelegate {
func getNo(id: Int) -> Void
}
View ChatViewController
class ChatViewController: SLKTextViewController {
var messages:[Message] = []
override class func tableViewStyleForCoder(decoder: NSCoder) -> UITableViewStyle {
return .Plain
}
override func viewDidLoad() {
super.viewDidLoad()
View EchoTemplate
package main
import (
"io"
"fmt"
"net/http"
"html/template"
"github.com/labstack/echo"
"github.com/labstack/echo/engine/standard"
)
View HatebuCss
/* <system section="theme" selected="evergreen"> */
@import "/css/theme/evergreen/evergreen.css";
/* </system> */
body {
font-family: "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, HiraginoSansGB, sans-serif;
font-size: 18px;
font-weight: 300;
background: #fff;
View goScraping
go get github.com/PuerkitoBio/goquery"
View Class
import Alamofire
import SwiftyJSON
public class ApiConnection{
func getArticle(id:Int,callback: (String) -> Void) -> Void {
let url = "http://0.0.0.0:8080/article/" + String(id)
Alamofire.request(.GET, url)
.responseJSON {
View GoogleAppEngine app.yaml
application: ********
version: 1
runtime: go
api_version: go1
handlers:
- url: /.*
script: _go_app
View GoEchoServer
package handler
import (
"strconv"
"net/http"
"github.com/labstack/echo"
"github.com/tkc/go-echo-server-sandbox/models/user"
)
type (
View GoGormSample
package userModel
import (
"time"
"github.com/tkc/go-echo-server-sandbox/db"
_ "github.com/jinzhu/gorm/dialects/mysql"
)
type User struct {
Id int64
You can’t perform that action at this time.