Skip to content

Instantly share code, notes, and snippets.

View adamjohnson's full-sized avatar

Adam Johnson adamjohnson

View GitHub Profile
@adamjohnson
adamjohnson / default-file-type-installation.md
Last active August 29, 2015 14:05
DefaultFileType for Sublime Text - How to get it up and running

How to get the DefaultFileType pacakge for Sublime Text working

  1. Install the package via Package Control (it works with ST3, don't worry).
  2. Create a new file called default_file_type.sublime-settings and paste the following:
{
  "default_new_file_syntax" : "Packages/HTML/HTML.tmLanguage",
   "use_current_file_syntax" : false
}
@adamjohnson
adamjohnson / TodoReview.sublime-settings
Created October 8, 2014 21:53
My SublimeTodoReview settings. Excluding node_modules and .git, responds to TODO: and NOTE:, and orders your to-do's on top when the list get's generated.
{
"patterns": {
"TODO": "TODO[\\s]*?:[\\s]*(?P<todo>.*)$",
"NOTE": "NOTE[\\s]*?:[\\s]*(?P<note>.*)$"
},
"patterns_weight": {
"TODO": 10,
"NOTE": 20
},
"exclude_folders": [
@adamjohnson
adamjohnson / acer-c720-elementaryos-touchpad-fix.md
Last active August 29, 2015 14:13
Acer C720 ElementaryOS Touchpad Fix

Lots of folks note how Kernel 3.17 is supposed to fix trackpad issues. So, I initially installed 3.18 and found that my sound didn't work (? YMMV). Indeed, my trackpad did work, but my sound didn't. I then reinstalled elementary via elementaryos-chromebook and didn't update the kernel. Not updating the Kernel is reccommended:

http://shnatsel.blogspot.com/2013/12/why-you-should-not-upgrade-kernel-on.html

Here's what I did to get things working:

  1. Installed elementaryos-chromebook
  2. Booted into Elementary via Ctrl + L. Went through prompts.
  3. Went to Applications > Update Manager. Installed all updates.
  • Installed Hardware updates first. Rebooted.
@adamjohnson
adamjohnson / SassMeister-input.scss
Created January 30, 2015 16:19
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
// Primary
$dark-orange: #d9531e;
$orange: #f47b20;
$orange-med: #d9531e;
@adamjohnson
adamjohnson / SassMeister-input.scss
Created May 13, 2015 16:02
Stu Robertson's Media Query Mixin Example
// ----
// Sass (v3.4.13)
// Compass (v1.0.3)
// ----
$doc-font-size: 16;
@mixin mq($point, $IE9: false, $query1: min, $query2: width) {
@if $IE9 == true{
.lt-ie9 & {
@content;
@adamjohnson
adamjohnson / SassMeister-input.scss
Created June 25, 2015 15:32
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
// The variable cascade!
// NOTE: This example is meant to illustrate how variables cascade.
// NOTE: this may seem elementary, but imagine trying to override these variables in different files in different parts of the cascade.
// Example 1: Outputs white because $first-variable: 'blue'; comes after the .outputs-white class
$first-variable: 'white';
@adamjohnson
adamjohnson / controller.php
Created December 6, 2012 06:33
Overriding the Concrete5 Image block to not print out width & height attributes
<?php
defined('C5_EXECUTE') or die("Access Denied.");
/*
* How to make overrides/extend controllers in Concrete v5.6+
* 1. Create a new file & put your opening & closing PHP tags
* 2. Add line 2 above (execute or die!)
* 3. Go to (root)/concrete/blocks/block-you-want-to-override/file-you-want-to-override.php
* 4. You'll see something like 'class somethingBlah extends somethingElse_blah'. Copy that with the opening & closing brackets
* 5. Now go to (root)/concrete/core/controllers/blocks/file-you-want-to-change.php
* 6. Open said file and look at the functions inside of it. Copy from 'function... { stuff... }' --being sure to include the closing bracket
@adamjohnson
adamjohnson / SassMeister-input.scss
Created November 19, 2015 15:25
Generated by SassMeister.com.
// ----
// Sass (v3.4.14)
// Compass (v1.0.3)
// Bourbon (v4.2.3)
// Neat (v1.6.0)
// ----
@import "bourbon/bourbon";
@import "neat/neat";
@adamjohnson
adamjohnson / blueprint-screen-mobile.css
Created August 28, 2012 04:39
Make Blueprint CSS Mobile Friendly
/* -------- BEGIN MOBILE STYLES -------- */
/* By Adam Johnson - 8-28-12 - @adamj_design */
/* Paste these either at the end of your custom styles.css, or at the end of screen.css */
/*--- fluid images and objects ---*/
img, object, embed {max-width: 100%;}
/* Let's reset blueprint's grid. Inherits styles from: Default Layout. */
@media only screen and (max-width: 959px) {
.container {width:95%; margin: 0 10px;}
@adamjohnson
adamjohnson / _buttons.scss
Last active December 14, 2015 21:59
CSS3 Stylish buttons from Dira.ro, converted to SCSS
// ---
// Compass (v0.13.alpha.4)
// Sass (v3.2.7)
// ---
// Make making buttons easier
// https://css3-buttons.heroku.com/
// https://github.com/dira/CSS3-stylish-buttons
// This file has been converted to SCSS & requires Compass