Skip to content

Instantly share code, notes, and snippets.

View afbora's full-sized avatar
🎯
Focusing

Ahmet Bora afbora

🎯
Focusing
View GitHub Profile
@afbora
afbora / dynamic_colspan.js
Last active February 12, 2019 10:24
Dynamic Colspan / Colspan All Columns on Bootstrap Sample
$(function() {
jQuery.fn.exists = function(){return this.length>0;}
// Dynamic Colspan
if($('[colspan="auto"]').exists())
{
$.each($('[colspan="auto"]'), function( index, value ) {
var table = $(this).closest('table'); // Get Table
var siblings = $(this).closest('tr').find('th:visible, td:visible').not('[colspan="auto"]').length; // Count colspan siblings
@afbora
afbora / .htaccess
Last active June 16, 2019 18:49
Amazing htaccess with cache resources
# Amazing .htaccess
# Requires Following Modules Enabled
# mod_rewrite
# mod_deflate
# mod_headers
# mod_mime
# mod_expires
# rewrite rules
@xavierfoucrier
xavierfoucrier / gpg-signing.md
Last active April 24, 2025 11:07
GPG signing with Git and Github Desktop

GPG signing – git github-desktop

Here is a short guide that will help you setup your environment to create signed commits or signed tags with Git locally. This has been extensively tested on Windows with Git and the Github Desktop application: I use it every day for my professional development projects.

I you face any issue, feel free to leave a comment below.

Summary

  1. Sign commits or tags
  2. Key passphrase
  3. Disable signatures
  4. Renew a GPG key
@waaronking
waaronking / index.vue
Created June 23, 2020 10:44
TipTap Align-Text Example
<!-- This file is mainly pseudo code with parts copied from a working project to illustrate how tiptap-aligntext.plugin.js can be implemented into your project -->
<template>
<div>
<editor-menu-bar :editor="editor" v-slot="{ commands }">
<div class="menubar">
<i class="fas fa-align-left" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'left' }" @click="commands.aligntext({ align: 'left' })"></i>
<i class="fas fa-align-center" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'center' }" @click="commands.aligntext({ align: 'center' })"></i>
<i class="fas fa-align-right" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'right' }" @click="commands.aligntext({ align: 'right' })"></i>
<i class="fas fa-align-justify" :class="{ 'is-active': editor.activeMarkAttrs.aligntext.align === 'justify' }" @click="commands.aligntext({ align: 'justify' })"></i>