Skip to content

Instantly share code, notes, and snippets.

View ahmadajmi's full-sized avatar

Ahmad Ajmi ahmadajmi

View GitHub Profile
@J2TEAM
J2TEAM / envato-preview-bypass.js
Created December 28, 2020 07:21
Bookmarklet to remove preview iframe on Envato sites (Themeforest, Codecanyon)
javascript:window.top.location.replace(document.querySelector('.full-screen-preview__frame').src);
@iamandrewluca
iamandrewluca / edit-website.js
Created June 29, 2020 17:59
Enable page editing #bookmarklet
javascript: void ((function() {
/* More bookmarklets at https://gist.github.com/iamandrewluca/61feacf07bc4f2f50e70f986c2e9b2d2 */
document.body.contentEditable = 'true';
document.designMode='on';
})());
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var styleEl = document.getElementById('css-layout-hack');
if (styleEl) {
styleEl.remove();
return;
}
styleEl = document.createElement('style');
styleEl.id = 'css-layout-hack';
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active June 24, 2024 21:29
[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()
 }
@tillsanders
tillsanders / README.markdown
Last active October 24, 2022 18:41
How to add a page with all tags to the Casper 2 theme for the Ghost CMS
@whmii
whmii / gulpfile.js
Last active August 16, 2017 10:41
A handy gulpfile for use in ghost themes
var gulp = require('gulp');
var sass = require('gulp-sass'),
autoprefix = require('gulp-autoprefixer'),
bourbon = require('bourbon'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
zip = require('gulp-zip');
// Stylesheets
@ahmadajmi
ahmadajmi / phantomcss.md
Last active September 13, 2017 22:31
PhantomCSS example with Gulp
npm install gulp-phantomcss --save

gulpfile.js

var phantomcss      = require('gulp-phantomcss');

// PhantomCSS
@marcysutton
marcysutton / chrome-a11y-experiment-instructions.md
Last active January 31, 2023 22:07
Enable Chrome Accessibility Experiment

NOTE: This is no longer an experiment! You can use the accessibility inspector in Chrome Devtools now, including a fantastic color contrast inspection tool. Read more: https://developers.google.com/web/updates/2018/01/devtools#a11y


Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

@burningTyger
burningTyger / moodle_on_do.md
Last active September 20, 2023 03:07
How To Install Moodle via git with Postgres, Nginx and PHP on an Ubuntu 16.04 VPS

How To Install Moodle via git with Postgres, Nginx and PHP on an Ubuntu 16.04 VPS

Introduction

Moodle is a common online learning platform used in many educational settings around the world. This tutorial aims at giving admins a solid and speedy foundation for serving moodle to a small to medium sized institution. The setup focuses on simple maintenance and fast updates.

Prerequisites

  • Create a small droplet with Ubuntu 16.04 (64Bit is great)
  • Follow the tutorial on setting up Ubuntu 16.04
  • git should be installed by default
@cy-park
cy-park / zip-excluding-specific-directories-and-files.md
Created February 17, 2016 03:13
Zip excluding specific directories and files

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*