Skip to content

Instantly share code, notes, and snippets.

@sixFingers
sixFingers / gist:53dcf75c7f74f372476b
Last active August 29, 2015 14:06
A useful collection of CSS3 sass mixins
/* -------------------------------------------------------------
Sass CSS3 Mixins! The Cross-Browser CSS3 Sass Library
By: Matthieu Aussaguel, http://www.mynameismatthieu.com, @matthieu_tweets
List of CSS3 Sass Mixins File to be @imported and @included as you need
The purpose of this library is to facilitate the use of CSS3 on different browsers avoiding HARD TO READ and NEVER
ENDING css files
note: All CSS3 Properties are being supported by Safari 5
('Abkhazia', 'Abkhazian', 'Abkhazians');
('Afghanistan', 'Afghan', 'Afghans');
('Albania', 'Albanian', 'Albanians');
('Algeria', 'Algerian', 'Algerians');
('American Samoa', 'American Samoan', 'American Samoans');
('Andorra', 'Andorran', 'Andorrans');
('Angola', 'Angolan', 'Angolans');
('Anguilla', 'Anguillan', 'Anguillans');
('Antigua and Barbuda', 'Antiguan', 'Antiguans');
('Argentina', 'Argentinian', 'Argentinians');
@sixFingers
sixFingers / wordpress-check.sh
Last active December 24, 2016 06:30
Check for malware inside a Wordpress installation
#!/bin/bash
# ================
# Injection checks
# ================
notices[0]=".php files in /uploads"
checks[0]="find ./wp-content/uploads -type f -name \"*.php\""
notices[1]="'bin/perl'"
@sixFingers
sixFingers / gist:5881446
Last active December 19, 2015 02:09
Proof of concept for end-to-end testing in Meteor, with Phantom JS and... Meteor itself.

Prerequisites

Install phantomJS:

[sudo] npm install -g phantom

Create a /tests folder into your Meteor app:

cd [app folder] && mkdir tests && cd tests

@sixFingers
sixFingers / gist:5467996
Last active December 16, 2015 17:09
A simple scss mixin to render a tooltipped-box.
@mixin tooltip($background, $borderColor) {
position: relative;
background: $background;
border: 1px solid $borderColor;
&:after {
content: "";
display: block;
position: absolute;
left: 50%;
@sixFingers
sixFingers / gist:5435795
Created April 22, 2013 15:09
Make rivets.js publish data to model when elements with "data-text" attribute get blur.
rivets.binders.text = (function() {
var handler = function(e) {
return rivets.config.adapter.publish(e.data.model, e.data.keypath, $(e.currentTarget).text());
}
var binding = {
publishes: true,
bind: function(el) {
return $(el).on("blur", null, this, handler);
},
@sixFingers
sixFingers / gist:5435782
Created April 22, 2013 15:07
Jquery plugin to select all elements with [data-*] attributes.
(function($) {
$.extend($.expr[":"], {
data: function(current, index, match, stack) {
for (var i = 0, attrs = current.attributes, l = attrs.length; i < l; i++) {
if((/\bdata-/g).test(attrs.item(i).nodeName)) return true;
}
return false;
}
})