Skip to content

Instantly share code, notes, and snippets.

cmehmet cmehmet-tomp

Block or report user

Report or block cmehmet-tomp

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 auth.js
import axios from 'axios'
import Ls from '@services/ls'
import router from '@router'
import VueJwtDecode from 'vue-jwt-decode'
export const fullsepp_axios = axios.create({
headers: { 'Content-Type': 'application/json'},
timeout: 3000,
keepAlive: true
View index.js
import axios from 'axios'
import Ls from '@services/ls'
import router from '@router'
export const sitename_axios = axios.create({
headers: { 'Content-Type': 'application/json'},
timeout: 3000,
keepAlive: true
cmehmet-tomp / general_options.vue
Created Dec 20, 2018
Vue Component with Vuex calls
View general_options.vue
<div class="page-content-center">
<div class="page-content">
<div class="form-alt-baslik">{{ $t('genel_tercihler_page.title-time-preferences') }}</div>
<template class="form_spinner" v-if="content_loading">
<div class="page_content_loader">
<spinner :status="content_loading"></spinner>
cmehmet-tomp / aliases.config.js
Created Dec 20, 2018
Vue Allias Wepback extension
View aliases.config.js
const path = require('path')
const aliases = {
'@': 'src',
'@helpers': 'src/_helpers',
'@router': 'src/router',
'@views': 'src/views',
'@layout': 'src/layout',
'@components': 'src/components',
'@assets': 'src/assets',
'@services': 'src/services',
cmehmet-tomp / routes.js
Created Dec 20, 2018
RoutesJs , Validates authentication with Vuex Call
View routes.js
// Use the HTML5 history API (i.e. normal-looking routes)
// instead of routes with hashes (e.g.
// This may require some server configuration in production:
mode: 'history',
// Simulate native-like scroll behavior when navigating to a new
// route and using back/forward buttons.
scrollBehavior(to, from, savedPosition) {
cmehmet-tomp / popup.js
Created Dec 20, 2018
Popup components - You need to place everything in their files.
View popup.js
import popup from '@components/blocks/popup';
components: {
'sitename-popup' : popup
popup_type = 'default'
popover_title = "Join our bounty program"
cmehmet-tomp / main.js
Created Dec 20, 2018
Vuex Translation
View main.js
import {store} from '@state'
// load vuex i18n module
import vuexI18n from 'vuex-i18n';
Vue.use(vuexI18n.plugin, store);
import translationsTr from '@src/resources/languages/al.json'
import translationsEn from '@src/resources/languages/en.json'
// add translations directly to the application
Vue.i18n.add('al', translationsTr);
Vue.i18n.add('en', translationsEn);

Keybase proof

I hereby claim:

  • I am cmehmet-tomp on github.
  • I am canmehmet ( on keybase.
  • I have a public key whose fingerprint is F230 CD9B ADAD 0B56 BF4E 65E5 1C29 FBEE 309D F627

To claim this, I am signing this object:

View VueJs Roadmap component.js
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12">
<div class="roadmap_container">
View Infinite Blog Posts Loading with Ajax.php
// wp_enqueue_sript Blog Ajax Script
function blog_page_js_enqueues(){
if (is_page_template( 'page-blog.php' ) || is_page_template( 'page-workplace.php' )){
wp_register_script( 'LoadMorePostsJS', TEMPLATE_URI . '/assets/dist/js/loadMorePosts.js', array( 'jquery' ), '', true );
wp_enqueue_script( 'LoadMorePostsJS' );
wp_localize_script( 'LoadMorePostsJS', 'headJS', array(
'ajaxurl' => admin_url( 'admin-ajax.php' ),
'templateurl' => get_template_directory_uri()
) );
You can’t perform that action at this time.