Skip to content

Instantly share code, notes, and snippets.

@jordanyaker
jordanyaker / .vimrc-example
Created January 11, 2012 02:11
My Current .vimrc File
" -----------------------------------------------------------------------
" Vundle Configurations
" -----------------------------------------------------------------------
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
@jordanyaker
jordanyaker / gist:2416523
Created April 18, 2012 21:02
hashex.js Implementation Example
new hashex.collection({
/*/: new hashex.collection({
/10001/: "I'm in english!!!",
/*/: "I'm default"
}),
/fr*/: new hashex.collection({
/10001/: "I'm in french!!!",
/*/: "I'm default"
})
@jordanyaker
jordanyaker / gist:2417310
Created April 18, 2012 23:20
Implementation Of Error Singleton
/* errors.coffee
----------------------------------------------------------------------*/
@Errors = new ->
_locales = new Array; _locale = null
@init = (locale) ->
count = 0
for entry, i in _locales
matches = entry.key.exec locale
@jordanyaker
jordanyaker / gist:2422396
Created April 19, 2012 17:14
Error Definitions
/* errors.default.coffee
--------------------------------------------------------------------------*/
@Errors.add
key: /(.+)/
value:
'10001' : 'An e-mail address is required for a user.'
'10002' : 'The specified e-mail address is already in use.'
'10003' : 'The specified e-mail address is invalid.'
'10004' : 'A name is required for a user.'
'10005' : 'The specified user name is invalid.'

So, at the end of the day, there are a lot of lessons that are taken as implicit in the world of Ember.js. However, much like everything else in Ember, these items aren't so easily understood.

Controllers Are Control Bindings

This is an important lesson that I keep forgetting. Controllers are NOT like controllers in a Server-side MVC. Controllers are NOT like the Collections that you find in Backbone.js. They are something that presents the model to the view. That's it. For example, given the following configuration snippet:

App.Router = Em.Router.map ->
  @resource 'root', { path: '/' }, ->
 @route 'create'
@jordanyaker
jordanyaker / javascript libraries.md
Created February 22, 2013 01:50
This is a compiled list of JavaScript libraries that I wanted to keep track of.

#JavaScript Libraries

The following is a list of JavaScript libraries that I've used or seen in action.

##Alerts and Notifications jQuery.Alerts

This library was part of the It's Brain theme that I worked with. It has easily stylable dialogs using a variety of types.

jGrowl

1 DYNO
===================================================
Benchmarking express-test.respage.com (be patient).....done
Server Software: Apache/2.2.25
Server Hostname: express-test.respage.com
Server Port: 80
Document Path: /users/login

Use the following code when selecting a column from a table:

  CAST(
    CAST(N'' AS XML).value(
        'xs:base64Binary(sql:column("Name"))'
      , 'VARBINARY(MAX)'
    ) 
    AS VARCHAR(MAX)
 ) Name

The following code should be added to your context by overriding the OnModelCreating function:

        protected override void OnModelCreating(DbModelBuilder modelBuilder) {
#if DEBUG
            using (MiniProfiler.Current.Step("DataContext.OnModelCreating")) { 
#endif
                base.OnModelCreating(modelBuilder);

                var addMethods = typeof(ConfigurationRegistrar).GetMethods()
@jordanyaker
jordanyaker / Pre Build.xml
Created November 15, 2013 16:43
Pre-Build Directive Code
<PreBuildEvent Condition=" '$(Platform)' == 'x86' ">copy "$(ProjectDir)Resources\Buzprog86\*" "$(ProjectDir)$(OutDir)" /Y</PreBuildEvent>
<PreBuildEvent Condition=" '$(Platform)' == 'x64' ">copy "$(ProjectDir)Resources\Buzprog64\*" "$(ProjectDir)$(OutDir)" /Y</PreBuildEvent>