Skip to content

Instantly share code, notes, and snippets.

💭
never stop.

Matheus Pratta MatheusMK3

💭
never stop.
Block or report user

Report or block MatheusMK3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@micho
micho / wysihtml5-resize.js
Created Mar 29, 2012
wysihtml5 resize plugin. Depends on jQuery and Underscore
View wysihtml5-resize.js
(function () {
var setupRegularResize, setupIframeResize, e;
function bind(a, b) {
return function () {
return a.apply(b, arguments);
};
}
setupRegularResize = (function () {
@deathlyfrantic
deathlyfrantic / dom-insert-after.php
Last active Nov 1, 2018
why doesn't the DOM spec include an insertAfter method, srsly guys
View dom-insert-after.php
<?php
/** Inserts a new node after a given reference node. Basically it is the complement to the DOM specification's
* insertBefore() function.
* @param \DOMNode $newNode The node to be inserted.
* @param \DOMNode $referenceNode The reference node after which the new node should be inserted.
* @return \DOMNode The node that was inserted.
*/
function insertAfter(\DOMNode $newNode, \DOMNode $referenceNode)
{
if($referenceNode->nextSibling === null) {
@novaugust
novaugust / Adding Disqus to a ghost blog on casper ~ 1.0
Last active Jan 6, 2019
Adding Disqus to a Ghost Blog running a Casper-based theme without editing any files
View Adding Disqus to a ghost blog on casper ~ 1.0
I noticed that there weren't any writeups for using code injection to add Disqus comments to a ghost blog. Everything assumes you're comfortable with editing your theme (and thus being responsible for maintaining a fork, urk).
So, I used the steps below to add to Disqus comments to my blog running a [Casper fork](https://github.com/novaugust/novasper). If your theme varies wildly from Casper, you'll be able to get by just by updating the css selectors in the javascript. If all that is a bit much for you, leave a comment and a link to your site and I'll give you what your versino of the code would be.
## Code Injection to the rescue
So! Here's the scoop
1. **Set up your disqus**. You're a grownup, you'll figure it out.
2. Go to your blog admin's **`Code Injection`** section (example.com/ghost/settings/code-injection/).
@jameskoster
jameskoster / functions.php
Created Jan 12, 2013
WooCommerce - hide ratings on product loop
View functions.php
// Remove the product rating display on product loops
remove_action( 'woocommerce_after_shop_loop_item_title', 'woocommerce_template_loop_rating', 5 );
@ianstormtaylor
ianstormtaylor / .bashrc
Created Aug 28, 2019
Aliases for nicer branching output from Git.
View .bashrc
alias gb="git branch --sort=-committerdate --verbose --format='%(HEAD) %(color:red)%(objectname:short)%(color:reset) - %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) - %(color:green)(%(committerdate:relative))%(color:reset) %(color:blue)<%(authorname)>%(color:reset)'"
alias gba="gb -a"
@Integralist
Integralist / 1. Example.scss
Created Oct 22, 2012
Sass Mixin for CSS3 Animations
View 1. Example.scss
@include keyframe(fadeout) {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
@diegoprates
diegoprates / gist:5047663
Last active Nov 28, 2019
Tradução do jQuery validation plugin para pt-BR.
View gist:5047663
/*
* Translated default messages for the jQuery validation plugin.
* Locale: PT_BR
*/
jQuery.extend(jQuery.validator.messages, {
required: "Este campo &eacute; requerido.",
remote: "Por favor, corrija este campo.",
email: "Por favor, forne&ccedil;a um endere&ccedil;o eletr&ocirc;nico v&aacute;lido.",
url: "Por favor, forne&ccedil;a uma URL v&aacute;lida.",
date: "Por favor, forne&ccedil;a uma data v&aacute;lida.",
View colour_themes.conf
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocksConfig version="1">
<editor>
<colour_sets>
<ACTIVE_COLOUR_SET>
<str>
<![CDATA[modnokai night shift v2]]>
</str>
</ACTIVE_COLOUR_SET>
<ACTIVE_LANG>
@Lewiscowles1986
Lewiscowles1986 / rPi3-ap-setup.sh
Last active Dec 12, 2019
Raspberry Pi 3 access-point-setup
View rPi3-ap-setup.sh
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi
@devinrhode2
devinrhode2 / clean-scrollbar.css
Created May 2, 2012
Like, basically PERFECT scrollbars
View clean-scrollbar.css
/**
* Like, basically PERFECT scrollbars
*/
/*
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.
You can’t perform that action at this time.