Skip to content

Instantly share code, notes, and snippets.

View mfd's full-sized avatar

Kami mfd

  • Checkmagush
View GitHub Profile
@fmal
fmal / fontsquirrel.png
Last active May 27, 2022 06:11
Font subsetting using pyftsubset
fontsquirrel.png
@perrysmotors
perrysmotors / TriggerAnimationOnScroll.tsx
Last active October 9, 2022 08:34
Trigger an animation when scrolling past a given position in Framer X
import { Override, Data, motionValue, useTransform } from "framer"
// Keep track of the state of our application
const data = Data({ isPastLimit: false })
// Create a MotionValue to track contentOffsetY
const contentOffsetY = motionValue(0)
// Listen for changes to contentOffsetY
contentOffsetY.onChange(offset => (data.isPastLimit = offset < -52))
anonymous
anonymous / vid-to-gif.sh
Created October 20, 2017 18:52
#!/bin/bash
# rev4 - changes suggested by KownBash https://www.reddit.com/r/bash/comments/5cxfqw/i_wrote_a_simple_video_to_gif_bash_script_thought/da19gjz/
# Usage function, displays valid arguments
usage() { echo "Usage: $0 [-f <fps, defaults to 15>] [-w <width, defaults to 480] inputfile" 1>&2; exit 1; }
# Default variables
fps=15
width=480
@davilera
davilera / 00-readme.md
Last active November 14, 2017 12:43
Vanilla JavaScript VS libraries

Some examples of the things one can do with Vanilla JavaScript. Comparison of Vanilla JS to jQuery and Underscore.js.

@mfd
mfd / modal.js
Created July 28, 2016 12:51 — forked from navdeepsingh/modal.js
Load Dynamic (AJAX) modal in Bootstrap 3, remove from DOM after timeout
$('[data-toggle="modal"]').click(function () {
var url = $(this).attr('href');
$.get(url, function (data) {
var modal = $('<div id="clue-modal" class="modal fade" tabindex="-1" role="dialog"><div class="modal-dialog"><div class="modal-content">' + data + '</div></div></div>').modal();
modal.on("hidden.bs.modal", function () {
$(this).remove();
});
setTimeout(function(){
modal.modal('hide');
},5000);
@mikepenz
mikepenz / debianessentials.md
Last active February 2, 2017 10:08
Install & Configure Debian Essentials

#ABOUT

#INSTALLATION Run following commands:

apt-get install curl -y
curl https://gist.githubusercontent.com/mikepenz/bea8ef149c4c04917f04/raw/7fded476f46b156e3bc3cb8b0696fa27267c6b78/debianessentials.sh | sh;
@jamesfalkner
jamesfalkner / liferay-7-wcm-adt-dump.ftl
Created November 24, 2015 21:45
A simple utility template to dump all available Liferay 7 WCM/ADT variables and their values.
<#-- dump.ftl
--
-- Generates tree representations of data model items.
--
-- Usage:
-- <#import "dump.ftl" as dumper>
--
-- <#assign foo = something.in["your"].data[0].model />
--
-- <@dumper.dump foo />
@lopezjurip
lopezjurip / README.md
Created September 26, 2015 12:13
OSX Homebrew: docker-machine setup

Prerequisites

Make sure you have installed Homebrew and (Homebrew-Cask)[http://caskroom.io/].

# Install Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Install Homebrew-cask
brew install caskroom/cask/brew-cask
@Vestride
Vestride / encoding-video.md
Last active April 24, 2024 09:59
Encoding video for the web

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus