Skip to content

Instantly share code, notes, and snippets.

View ahmadajmi's full-sized avatar

Ahmad Ajmi ahmadajmi

View GitHub Profile
<style>
.c-content .kg-callout-card.kg-callout-card-grey { background: rgba(124,139,154,.13); }
.c-content .kg-callout-card.kg-callout-card-blue { background: rgba(33,172,232,.12); }
.c-content .kg-callout-card.kg-callout-card-green { background: rgba(52,183,67,.12); }
.c-content .kg-callout-card.kg-callout-card-yellow { background: rgba(240,165,15,.13); }
.c-content .kg-callout-card.kg-callout-card-red { background: rgba(209,46,46,.11); }
.c-content .kg-callout-card.kg-callout-card-pink { background: rgba(225,71,174,.11); }
.c-content .kg-callout-card.kg-callout-card-purple { background: rgba(135,85,236,.12); }
.c-content .kg-callout-card.kg-callout-card-accent { background: var(--ghost-accent-color); }
</style>
{{#unless access}}
<aside class='c-post-upgrade-cta'>
{{#has visibility='members'}}
<h4 class='c-post-upgrade-cta__title'>{{t 'This page is for subscribers only'}}</h4>
{{/has}}
{{#has visibility='paid'}}
<h4 class='c-post-upgrade-cta__title'>{{t 'This page is for paying subscribers only'}}</h4>
{{/has}}
<div class='c-section'>
{{#get 'pages' slug='PAGE_SLUG' as |page| }}
{{#page}}
<div class='c-content'>
{{ content }}
</div>
{{/page}}
{{/get}}
</div>
{{!--
Used in the post.hbs & page.hbs file
--}}
<header class='c-page-header'>
<div class='{{#if custom_excerpt}}o-grid o-grid--2-columns{{/if}} {{#unless custom_excerpt}}no-custom_excerpt{{/unless}}'>
<div>
<h1 class='c-page-header__heading u-font-heading'>{{ title }}</h1>
{{#match primary_tag.slug 'writing'}}
<time class='u-color-text-secondary u-font-size-small u-mt-8' datetime='{{ date format='YYYY-MM-DD' }}'>{{ date format='MMM D, YYYY' }}</time>
@ahmadajmi
ahmadajmi / Dropdown.md
Created June 27, 2022 19:35
Dropdown.md

Code Injection (Site Header)

<style>
    @media (max-width: 63.99em) {
  .c-nav__dropDown {
    margin-left: var(--space-16);
  }
  .c-nav__dropDown .c-nav__item {
    margin-bottom: 0;
@ahmadajmi
ahmadajmi / unfollow.js
Created May 18, 2022 11:17 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
// 1. Go to https://twitter.com/YOUR_USER_NAME/following
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
//
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
<div class='c-card-author-mini'>
{{#if profile_image}}
<div class='c-card-author-mini__media'>
<img class='c-card-author-mini__image lazyload' data-src='{{ img_url profile_image size='profile-image-medium' }}' alt='' width='64' height='64'>
</div>
{{/if}}
<div class='c-card-author-mini__content'>
<h3 class='c-card-author-mini__name'><a href='{{ url }}'>{{ name }}</a></h3>
<p class='c-card-author-mini__bio'>{{{ bio }}}</p>
@ahmadajmi
ahmadajmi / delete-likes-from-twitter.md
Created February 11, 2022 11:31 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@ahmadajmi
ahmadajmi / deploy-theme.yml
Last active January 11, 2022 10:21
Deploy a Ghost theme to different installs.
name: Beirut Theme Deploy
on:
push:
branches:
- master
- main
- deploy
jobs:
deploy:
runs-on: ubuntu-18.04
(function() {
'use strict';
// Include Gulp & Plugins
var gulp = require('gulp'),
sass = require('gulp-sass')(require('sass')),
rtlcss = require('gulp-rtlcss'),
cleanCSS = require('gulp-clean-css'),
autoprefixer = require('gulp-autoprefixer'),