Skip to content

Instantly share code, notes, and snippets.

👨‍💻
Debugging

Thien Nguyen tatthien

👨‍💻
Debugging
Block or report user

Report or block tatthien

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 main.go
func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
body, _ := json.Marshal(map[string]interface{}{
"msg": "Hello from 12bit.vn",
})
return events.APIGatewayProxyResponse{
Headers: map[string]string{
"content-type": "application/json",
},
StatusCode: 200,
View main.go
package main
import (
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
)
func handler(request events.APIGatewayProxyRequest) (events.APIGatewayProxyResponse, error) {
return events.APIGatewayProxyResponse{
StatusCode: 200,
View navigation-top.php
<?php wp_nav_menu( array(
'theme_location' => 'top',
'menu_id' => 'top-menu',
'walker' => new Custom_Walker_Nav_Menu()
) ); ?>
@tatthien
tatthien / functions.php
Last active Nov 14, 2018
12bit-menu-walker
View functions.php
<?php
class Custom_Walker_Nav_Menu extends Walker_Nav_Menu {
// Code goes here
}
View navigation-top.php
<?php wp_nav_menu( array(
'theme_location' => 'top',
'menu_id' => 'top-menu',
) ); ?>
@tatthien
tatthien / header.php
Last active Nov 14, 2018
12bit-menu-walker
View header.php
<?php if ( has_nav_menu( 'top' ) ) : ?>
<div class="navigation-top">
<div class="wrap">
<?php get_template_part( 'template-parts/navigation/navigation', 'top' ); ?>
</div><!-- .wrap -->
</div><!-- .navigation-top -->
<?php endif; ?>
@tatthien
tatthien / test-functions.php
Last active Mar 14, 2018
12bit simple plugin
View test-functions.php
<?php
/**
* Class FunctionsTest
*
* @package 12bit_Simple_Plugin
*/
/**
* Sample test case.
*/
View 12bit-simple-plugin.php
<?php
/*
Plugin Name: 12bit Simple Plugin
Plugin URI: http://12bit.vn
Description: Used for testing purpose.
Version: 1.0.0
Author: 12bit.vn
Author URI: http://12bit.vn
License: GPLv2 or later
Text Domain: 12bit
@tatthien
tatthien / Notification.vue
Created Mar 5, 2018
Vue Notie - snippet #6
View Notification.vue
<script>
export default {
methods: {
success (message) {
this.$_vuenotie_success(message)
}
}
}
</script>
@tatthien
tatthien / Notification.vue
Last active Mar 5, 2018
Vue Notie - snippet #5
View Notification.vue
<template>
<div class="notifications">
<button @click="$_vuenotie_success('Success!')">Success</button>
<button @click="$_vuenotie_warning('Warning!')">Warning</button>
<button @click="$_vuenotie_error('Error!')">Error</button>
<button @click="$_vuenotie_infor('Information!')">Information</button>
</div>
</template>
You can’t perform that action at this time.