Skip to content

Instantly share code, notes, and snippets.

View ahmetus's full-sized avatar

Ahmet Usal ahmetus

View GitHub Profile
@ahmetus
ahmetus / gist:3492284
Created August 27, 2012 21:12 — forked from mattbanks/gist:3153899
Create new WP_Query with TextExpander (version 4 required)
// New query
$%filltext:name=Query Name:default=myquery%_args = array(
'post_type' => '%filltext:name=Post Type:default=post%',
'order' => '%fillpopup:name=popup 7:default=ASC:DESC%',
'orderby' => '%fillpopup:name=popup 9:default=date:ID:rand:title:author%',
'post_statust' => 'publish',
'posts_per_page' => %filltext:name=Posts Per Page:default=-1%
);
$%filltext:name=Query Name:default=myquery% = new WP_Query( $featured_args );
@ahmetus
ahmetus / BEM-inuit.css.md
Created October 18, 2012 08:37 — forked from csswizardry/BEM-inuit.css.md
Thoughts on BEM for inuit.css

Bringing BEM to inuit.css

BEM is a methodology for naming and classifying CSS selectors in a way to make them a lot more strict, transparent and informative.

The naming convention follows this pattern:

.block{}
.block__element{}
.block--modifier{}
@ahmetus
ahmetus / README.md
Created November 1, 2012 19:48 — forked from aiwilliams/README.md
Storyboard in RubyMotion 1.4

Start XCode and create a new Storyboard file. I closed all my other XCode projects. When you choose the location of the created file, it should be your RubyMotion project's resources directory. Add a UIViewController, and set it's identifier property to "Start". Add some UI elements so you can see it working.

When you run rake in your RubyMotion project, it will compile the .storyboard file. You could auto-load the Storyboard using a plist configuration, but you'll see code can do it too.

@ahmetus
ahmetus / README.md
Created November 5, 2012 08:07 — forked from aiwilliams/README.md
Storyboard in RubyMotion 1.4

Start XCode and create a new Storyboard file. I closed all my other XCode projects. When you choose the location of the created file, it should be your RubyMotion project's resources directory. Add a UIViewController, and set it's identifier property to "Start". Add some UI elements so you can see it working.

When you run rake in your RubyMotion project, it will compile the .storyboard file. You could auto-load the Storyboard using a plist configuration, but you'll see code can do it too.

@ahmetus
ahmetus / gist:4077321
Created November 15, 2012 08:07 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@ahmetus
ahmetus / launch_sublime_from_terminal.markdown
Created December 4, 2012 08:00 — 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

#!/bin/sh
echo "
Cool, let's start.
"
src=$PWD
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js

This article was forked from Marshall Huss's Bamboo stack article and updated by Lee Reilly. Lee is a toolsmith and master pintsman hacking on GitHub Enterprise.

Static Sites with Ruby on Heroku/Cedar

Sometimes you just have a static website with one or two pages. Here is a simple way to host your static site and cache it on Heroku using a Rack app.

Your folder should be organized like this:

- MySite
git config --global alias.ksreview '!f() { local SHA=${1:-HEAD}; local BRANCH=${2:-master}; if [ $SHA == $BRANCH ]; then SHA=HEAD; fi; git difftool -y -t Kaleidoscope $BRANCH...$SHA; }; f'