Skip to content

Instantly share code, notes, and snippets.

View jameswilson's full-sized avatar

James Wilson jameswilson

View GitHub Profile
@joelpittet
joelpittet / _autocomplete.base.scss
Last active August 29, 2015 14:06
Throbber replacement
// Animated throbber
html.js .form-autocomplete {
background-image: image-url('svg/throbber-inactive.svg');
background-position: 95% center;
background-position: -webkit-calc(100% - 5px) center;
background-position: calc(100% - 5px) center;
background-repeat: no-repeat;
}
html.js .throbbing {
@ry5n
ry5n / sass-input-placeholders
Created March 13, 2012 07:06
CSS3 Input Placeholders using Sass 3.2
// Handle browser inconsistencies with placeholder pseudo-elements.
@mixin placeholders {
&::-webkit-input-placeholder { @content; }
&:-moz-placeholder { @content; }
&::placeholder { @content; }
}
// Set the colour for input placeholder text.
@mixin placeholder($color: #bfbfbf) {
@include placeholders {
@jameswilson
jameswilson / QLColorCode-drupal.patch
Created May 12, 2012 15:38
Patch for Drupal QuickLook Syntax Highlighting with QLColorCode.qlgenerator
diff --git a/Contents/Info.plist b/Contents/Info.plist
index 30088e8..6516736 100644
--- a/Contents/Info.plist
+++ b/Contents/Info.plist
@@ -170,6 +170,8 @@
<key>public.filename-extension</key>
<array>
<string>ini</string>
+ <string>info</string>
+ <string>diz</string>
@jameswilson
jameswilson / QLColorCode-sass-less-compass.patch
Created May 12, 2012 16:19
Patch for SASS, LESS, Compass QuickLook Syntax Highlighting with QLColorCode.qlgenerator
diff --git a/Contents/Info.plist b/Contents/Info.plist
index 30088e8..1fba4c8 100644
--- a/Contents/Info.plist
+++ b/Contents/Info.plist
@@ -284,6 +284,9 @@
<key>public.filename-extension</key>
<array>
<string>css</string>
+ <string>less</string>
+ <string>scss</string>
@jameswilson
jameswilson / columns.css
Created August 1, 2014 22:53
Columns based on number of siblings
/**
* Technique from http://lea.verou.me/2011/01/styling-children-based-on-their-number-with-css3/
*/
/* one item */
li:first-child:nth-last-child(1) {
width: 100%;
}
/* two items */
@jameswilson
jameswilson / MrMoneyMustache.css
Last active December 10, 2015 14:32
MrMoneyMustache.com CSS file for GreaseMonkey Script https://greasyfork.org/en/scripts/13870-mr-money-mustache
body {
background: #fff;
}
.postbg {
background: transparent;
box-shadow: none;
}
.header_area {
@cimmanon
cimmanon / _flexbox.scss
Last active February 11, 2016 02:51
New Flexbox mixins (in progress)
// $flexbox-support values:
// standard: Draft #3
// modern: Draft #2 or newer
// legacy: Draft #1 only
// wrap: versions that support wrapping (includes feature query on the display property on the unprefixed standard value)
// all: all versions
$flexbox-support-threshold: $critical-usage-threshold !default;
$flexbox-support: modern !default;
$flexbox-warnings: true !default;
@Jach
Jach / mig.py
Created December 30, 2011 04:09
Dirty migration script from Jira issues to Github issues
'''
Steps:
1. Create any milestones
2. Create any labels
3. Create each issue, linking them to milestones and labels
3.1: Update status for new issue if closed
4: Create all the comments for each issue
'''
import getpass
import json
@peterlozano
peterlozano / drupal_8_send_email.php
Created June 23, 2016 14:03
Sending mail from drupal 8
<?php
// To be passed to hook_mail
$params = array();
// To be passed to hook_mail
$key = 'my_mail_key';
$langcode = \Drupal::languageManager()->getDefaultLanguage();
\Drupal::service('plugin.manager.mail')
@xavez
xavez / Gruntfile.js
Last active August 2, 2016 05:20
Grunt: Compass, Autoprefixer, CSS/JS minification and Livereload. Use the `npm install`and `grunt` commands consecutively to execute.
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({