Skip to content

Instantly share code, notes, and snippets.

View alexcarpenter's full-sized avatar
:shipit:

Alex Carpenter alexcarpenter

:shipit:
View GitHub Profile
@artero
artero / launch_sublime_from_terminal.markdown
Last active May 15, 2024 03:38 — forked from olivierlacan/launch_sublime_from_terminal.markdown
Launch Sublime Text 2 from the Mac OS X Terminal

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl

You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html

Installation

@mynameispj
mynameispj / post.html
Created July 12, 2012 22:21
512 Pixels Linked List CSS
<h2 class="entry-title">
<a href="web.html">
The title of an awesome post
<span class="glyph" href="web.html">&raquo;</span>
</a>
</h2>
@ludder
ludder / slideDown.js
Created December 6, 2012 17:25
Vanilla JavaScript slideUp and slideDown functions
/*
Element to slide gets the following CSS:
max-height: 0;
opacity: 0;
overflow: hidden;
transition: max-height 0.4s ease 0s;
*/
/**
* Like jQuery's slideDown function - uses CSS3 transitions
@SimonSimCity
SimonSimCity / pagination.html.twig
Last active September 30, 2023 17:29
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
{#
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/
Updated by: Simon Schick <simonsimcity@gmail.com>
Parameters:
* currentFilters (array) : associative array that contains the current route-arguments
* currentPage (int) : the current page you are in
* paginationPath (string) : the route name to use for links
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled)
* lastPage (int) : represents the total number of existing pages
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 17, 2024 14:20
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@psql
psql / Future.html
Created September 18, 2013 10:56
Future list
<html>
<head>
<title>The Future</title>
<script type="text/javascript" src="//use.typekit.net/rfz5cki.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
// LOAD file and split line by line and append divs
$.get('https://dl.dropboxusercontent.com/u/36496/future/Do.txt', function(data) {
@mrmrs
mrmrs / html5-element-list.txt
Created November 25, 2013 22:43
List of all html 5 elements, in alphabetical order.
a
abbr
address
area
article
aside
audio
b
bdi
bdo
@necolas
necolas / structure
Created December 18, 2013 01:02
Wintersmith site structure, using Component(1), Nunjucks, and eventually Rework.
.
├── README.md
├── component.json
├── components (installed by Component(1))
├── components-data
│   ├── a-page.md
│   └── articles
├── components-local
│   ├── article
│   │   ├── article.css
@manikrathee
manikrathee / full-height-header.js
Created January 10, 2014 21:10
A simple bit of JS to set a header image to 100% height
var windowHeight = $(window).innerHeight();
function viewportScale(){
$('#landing').css('height', windowHeight);
}
$(document).ready(function() {
viewportScale();
});
@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft