Skip to content

Instantly share code, notes, and snippets.

<label class="item item-icon-right">
<select style="opacity:0; width:100%; position:absolute; z-index=100" ng-options="option for option in question.options">
<option value="">Select...</option>
</select>
<span class="input-label">Input Label:</span>
<span class="item-note">Your answer was {{ question.responses[0] }}</span>
<i class="icon ion-ios7-arrow-down"></i>
</label>
@bavey
bavey / git-magic
Created December 2, 2014 16:20
Git Magic
Git
1. I'm on master
2. git fetch
3. git pull origin master
4. git checkout -b BRANCH_NAME origin/master
5. git push -u origin BRANCH_NAME
git remote show origin
vim ~/.gitconfig
@bavey
bavey / monokai-best-brian-theme
Created October 20, 2014 13:04
Monokai Best Brian Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- Created by: Shakeel Mohamed ShakeelMohamed.com -->
<!-- Based on Monokai vivid with: Monokai's selection color, Monokai Gray's background color, and colored JSON. -->
<plist version="1.0">
<dict>
<key>name</key>
@bavey
bavey / optimizely-variant-testing-homepage
Last active August 29, 2015 14:06
Variant Testing for New Homepage
//
// Optimizely
// Variant Testing for New Homepage
//
//-----------------------------------------------------------------------------
// 1. 3 Circle DM Consult A (Sign Up Beginning)
//-----------------------------------------------------------------------------
// Toggle module
@bavey
bavey / gist:9769186
Created March 25, 2014 19:21
Jasmine Notes
# [http://jasmine.github.io/](Jasmine)
## Suites describe your tests
- Global Jasmine function `describe` accepts 2 parameters: `string`, `function`. String is name or title for a spec suite, usually what is being tested. Function is block of code that implements the suite.
## Specs
- Specs are defined by calling the global Jasmine function `it`, which accepts a `string` and `function`. String is a title for this spec and the function is the spec or test. A spec contains one more more expectations that test the state of the code under test.
## Expectations
-
@bavey
bavey / gommongitcommands.md
Last active August 29, 2015 13:57
Common Git Commands

Common Git Commands

Configure file locations

  • System
    • /etc/gitconfig
    • Program Files\Git\etc\gitconfig
  • User
    • ~/.gitconfig
    • $HOME\.gitconfig
  • Project
@bavey
bavey / gist:8713170
Last active April 8, 2019 08:27
Resolving Heroku/Git push deployment errors.

This is how to resolve the following command line error message when pushing your app to Heroku:

~/Desktop/appname git push heroku master
fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.
fatal: 'heroku' does not appear to be a git repository
Please make sure you have the correct access rights and the repository exists.

The above error message appears because there's no remote named heroku. When you do a heroku create, if the git remote doesn't already exist, Heroku automatically creates one assuming you're in a git repo.

@bavey
bavey / gist:8329558
Last active January 2, 2016 16:19
How to use a jQuery Plugin with RequireJS

##How to use a jQuery Plugin with RequireJS

I'm using several jQuery Plugins for a Node app I'm building. One plugin in particular which I'll use for illustration purposes is jQuery Cookie. jQuery Cookie depends on jQuery, therefore I needed an ascyhonous dependency management solution.

After searching throug RequireJS documentation and trial and error, I was able to put together the following working code to serve as a shim. This code resides in a a file called common.js and sits at the root of my /javascripts directory (where all of my other RequireJS modules camp out as well.) In this file I define two resources. In this case I'm pointing to CDN versions of jQuery and jQuery Cookie (this actually further exaserbates the need for a dependency management system as I'm not loading these resources from my own server and can't control latency and network delays.)

common.js

require.config({

paths: {

@bavey
bavey / Preferences.sublime-settings
Last active December 27, 2015 14:28
My Sublime User Preference Settings
{
"caret_style": "smooth",
"close_windows_when_empty": true,
"create_window_at_startup": false,
"font_size": 14,
"highlight_line": true,
"hot_exit": false,
"ignored_packages":
[
"Vintage"
@bavey
bavey / common-mysql-cli-commands.md
Last active May 26, 2020 02:28
Common MySQL CLI Commands

Common MySQL CLI Commands

The following commands are organized by their CRUD functionality. This was designed to be a quick 'n easy cheat sheet.

Sample Data

Database: savetheworld
Table: superheros

id superhero password email age
1 batman badpassword batman@superhero.com 40