Skip to content

Instantly share code, notes, and snippets.

@adamjohnson
adamjohnson / _breadcrumbs.css
Last active December 19, 2015 19:58
Breadcrumbs in an unordered list for SlateCMS: http://slatecms.wvu.edu
#breadcrumbs li { display: inline; list-style-type: none; margin-left: 0; }
#breadcrumbs li:before { content: "\00BB"; padding-right: 3px; }
#breadcrumbs li:first-child:before { content: ""; padding-right: 0; }
@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 / mq.sublime-snippet
Last active November 28, 2017 16:54
Media Query Sublime Text Snippet
<snippet>
<content><![CDATA[
@include mq(\$bp-${1:}) \{
${2:Type then hit tab!}
\} //mq
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>mq</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope> seems to break stuff / not work / disable snippet. ¯\_(ツ)_/¯ -->
@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 / preferences.sublime-settings
Last active November 26, 2019 20:06
Exclude folder from search in Sublime Text. Helpful if you want to have the folder show up on the left, but don't want Sublime to search it when doing a "Find in Files" / project-wide search.
{
"binary_file_patterns": ["node_modules/*", "bower_components/*"]
}