Skip to content

Instantly share code, notes, and snippets.

"use strict";
(function() {
Error.stackTraceLimit = -1;
var go$reservedKeywords = ["abstract", "arguments", "boolean", "break", "byte", "case", "catch", "char", "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum", "eval", "export", "extends", "false", "final", "finally", "float", "for", "function", "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long", "native", "new", "package", "private", "protected", "public", "return", "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient", "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"];
var go$global;
if (typeof window !== "undefined") {
go$global = window;
if user := gSiteData.User(); user == nil {
http.Get(serverUrl("/auth")).Success(func(user model.User, status int) {
gSiteData.SetUser(user)
})
} else {
return user
}
2014/05/30 18:48:55 -------------------------------------------------------
2014/05/30 18:48:55 Import path "fmt" was not resolved
2014/05/30 18:48:55 Gocode's build context is:
2014/05/30 18:48:55 GOROOT: /usr/local/go
2014/05/30 18:48:55 GOPATH: /home/phaikawl/Dev/go
2014/05/30 18:48:55 GOOS: linux
2014/05/30 18:48:55 GOARCH: 386
2014/05/30 18:48:55 lib-path: ""
2014/05/30 18:48:55 Import path "reflect" was not resolved
2014/05/30 18:48:55 Gocode's build context is:
#version 130
uniform sampler2D u_texture;
//uniform vec2 g_Resolution;
varying vec2 Texcoord;
out vec4 outColor;
#define FXAA_PC 1
#define FXAA_GLSL_130 1
#define FXAA_GREEN_AS_LUMA 1
#define FXAA_QUALITY__PRESET 39
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <stdlib.h>
#include <stdio.h>
#include <fstream>
#include <unistd.h>
#include <iostream>
using namespace std;
o = reflect.NewAt(reflect.TypeOf(jso.Interface()), unsafe.Pointer(jso.Unsafe())).Elem()
println(o.FieldByName(field).CanInterface()) //It returns true
println(o.FieldByName(field).Interface()) //Uncaught TypeError: Cannot read property 'constructor' of undefined

github.com/pengux/check/check.go: line 134 change to:

func (e StructError) ToMessages() map[string]map[string]string {

github.com/gopherjs/jquery.go: line 56 change to:

Length   int   `js:"length"`
@hami9x
hami9x / dfdf
Created June 24, 2014 06:34
sdfsdf
<html><head>
<title>Wade Home</title>
</head>
<body>
<script type="text/wadin" id="wade-content">
<wimport src="/public/pages.html"></wimport>
<wimport src="/public/elements.html"></wimport>
</script>
<wpage><strong>sdfsdf</strong></wpage>
@hami9x
hami9x / gist:d378b7722e830c6ba049
Created July 10, 2014 14:18
Kien's blog platform manifesto
* Không đơn giản là blogging, là 1 mxh blogging
* Sử dụng tốt các platform, các mạng xã hội khác làm nền tảng
* Phải thu hút đc những người viết blog chuyên nghiệp
* Những chức năng để người viết blog chuyên nghiệp thoải mái về mặt chức năng, đăng quảng cáo, thoải mái về giao diện... có cần thiết không? <- Kiên: trước mắt là không
*
@hami9x
hami9x / gist:36809442bb9bd39553c0
Created March 10, 2015 09:53
Wade.Go all-at syntax
<div class="row-fluid">
<div class="col-sm-1">
<c:votebox @vote="Vm.Post.Vote" @vote_url="Vm.postVoteUrl()"></c:votebox>
</div>
<div class="col-sm-11">
<div>
<a @href="ctx().getPostLink(Vm.Post)">{{ Vm.Post.Title }}</a>
<span class="label label-default" @for(_,label)="Vm.Post.Labels">{{ label }}</span>
</div>
<div>