Skip to content

Instantly share code, notes, and snippets.

@adamjohnson
adamjohnson / responsive_960grid.css
Created November 9, 2011 16:18
The Responsive 960 Grid System, Beta v0.6
/* Begin 960.css 12 and 16 column minified, 10-27-10 via 960-Grid-System at GitHub
* Licensed under GPL and MIT licenses, just like the original 960 Grid
* Adaptive media queries created by Adam Johnson. @adamj_design | http://adamjohnsondesign.com
*/
body{min-width:960px}.container_12,.container_16,.container_24{margin-left:auto;margin-right:auto;width:960px}.grid_1,.grid_2,.grid_3,.grid_4,.grid_5,.grid_6,.grid_7,.grid_8,.grid_9,.grid_10,.grid_11,.grid_12,.grid_13,.grid_14,.grid_15,.grid_16,.grid_17,.grid_18,.grid_19,.grid_20,.grid_21,.grid_22,.grid_23,.grid_24{display:inline;float:left;margin-left:10px;margin-right:10px}.push_1,.pull_1,.push_2,.pull_2,.push_3,.pull_3,.push_4,.pull_4,.push_5,.pull_5,.push_6,.pull_6,.push_7,.pull_7,.push_8,.pull_8,.push_9,.pull_9,.push_10,.pull_10,.push_11,.pull_11,.push_12,.pull_12,.push_13,.pull_13,.push_14,.pull_14,.push_15,.pull_15{position:relative}.container_12 .grid_3,.container_16 .grid_4{width:220px}.container_12 .grid_6,.container_16 .grid_8{width:460px}.containe
@adamjohnson
adamjohnson / skeleton_wide.css
Created February 21, 2012 16:15
1200px Media Query for the Skeleton Grid
/* 1200px Media Query for the Skeleton Grid - http://getskeleton.com
* Adapted from http://www.aliaspooryorik.com/blog/index.cfm/e/posts.details/post/responsive-css-grid-systems-345
* Added .alpha.omega combo classes. Hope to see that fixed in later versions of Skeleton: https://github.com/dhgamache/Skeleton/issues/68
*/
@media only screen and (min-width: 1200px) {
.container { width: 1200px;}
.container .column,
.container .columns { margin-left: 10px; margin-right: 10px; }
@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 / index.html
Created October 3, 2012 19:48
Working with Attributes in Concrete5, download this code and paste into a .html document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Working with Attributes in Concrete5</title>
<style>
pre { border: 1px solid black; padding:10px; }
</style>
</head>
<body>
@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 / Preferences.sublime-settings
Last active December 11, 2020 17:27
My Sublime Text User Preferences
{
"always_show_minimap_viewport": true,
"binary_file_patterns":
[
"node_modules/**",
"bower_components/**"
],
"bold_folder_labels": true,
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"fade_fold_buttons": false,
@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
@adamjohnson
adamjohnson / at-include.sublime-snippet
Last active July 30, 2018 15:53
Create a tab trigger / shortcut for Sublime Text to spit out @include when you type 'in' then hit tab. Go to Tools > New Snippet. Save this in Packages > User.
<snippet>
<content><![CDATA[
@include
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>in</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.scss</scope> -->
</snippet>
@adamjohnson
adamjohnson / retina-images.scss
Last active December 16, 2015 08:29
Painless retina images in Sass. Requires Compass.
// Painless Retina Images:
// =======================
// https://gist.github.com/adamjohnson/5406454
// http://blog.andrewckor.com/post/43347215341/retina-background-images-sass-mixin
// Requires Compass
// Suffix retina imagery with "@2x" & put in the same directory as normal assets (or specifiy a different directory in the @include)
@mixin bg-with-retina( $path, $img, $filetype, $size ) {
background-image: image-url( $path + $img + '.' + $filetype );
@include background-size( $size );
@adamjohnson
adamjohnson / publickey-git-error.markdown
Last active April 18, 2024 01:00
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th