Skip to content

Instantly share code, notes, and snippets.

View geosem42's full-sized avatar

George geosem42

View GitHub Profile
@n1crack
n1crack / Like.vue
Created May 10, 2017 04:24
Like button
<template>
<button type="submit" class="btn btn-secondary btn-sm like-button"
rel="tooltip" title="Beğen"
v-on:click="favorite"
v-bind:disabled="submitted">
<i class="fa" v-bind:class="iconFavori"></i> {{ total_likes }}
</button>
</template>
<script>
@anthonyholmes
anthonyholmes / bootstrap-sass-mixin-cheatsheet.scss
Created October 10, 2014 08:13
Bootstrap Sass Mixin Cheatsheet
// Alerts
@include alert-variant($background, $border, $text-color);
// Background Variant
@include bg-variant($parent, $color);
// Border Radius
@include border-top-radius($radius);
@include border-right-radius($radius);
@include border-bottom-radius($radius);
@munirkamal
munirkamal / Wordpress - Track and Display post views.php
Last active April 12, 2018 23:45
Wordpress snippet to track and display post or page views in your wordpress website without using any plugin.
/*******************************************************/
/ Shared by www.codewordpress.com /
/ Add following code to Function.php file in your theme /
/*******************************************************/
<?php
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
@tobysteward
tobysteward / BlogController.php
Last active January 2, 2025 07:28
Laravel AJAX Pagination with JQuery
<?php
class BlogController extends Controller
{
/**
* Posts
*
* @return void
*/
public function showPosts()
@hitautodestruct
hitautodestruct / readme.md
Last active September 26, 2022 11:25 — forked from anonymous/gist:4344870
Generate a custom structure for Wordpress menus.

This gist is for showing an example of a custom wordpress menu.

If you want to get more from the menu item simply have a look at the $item object. i.e:

// Will return a large object with lots of props like title, url, description, id etc.
var_dump( $item );

This code works on Wordpress 4.1.1 as of 31st of March 2015

@paulruescher
paulruescher / Extend Recent Posts
Created June 26, 2012 19:02
Used this to change the output of WordPress' Recent Posts Widget
/**
* Extend Recent Posts Widget
*
* Adds different formatting to the default WordPress Recent Posts Widget
*/
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts {
function widget($args, $instance) {