This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
An example of writing REST web services in ColdFusion, without a framework (and why you should use one). | |
Provided as an example of a simple implementation, but should not be considered a best practice or something | |
I am promoting. Not thoroughly tested, not very maintainable, not even that reusable. | |
---> | |
<cfsetting enablecfoutputonly="true" showdebugoutput="false" /> | |
<cffunction name="StructKeyRequire" output="false"> | |
<cfargument name="s" type="struct" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.factory('API', function($http, $q){ | |
var basePath = 'http://domain.com/api/path'; | |
// => http://domain.com/api/path/foo/bar | |
function makeRequest(verb, uri, data){ | |
var defer = $q.defer(); | |
verb = verb.toLowerCase(); | |
//start with the uri |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt){ | |
'use strict'; | |
grunt.initConfig({ | |
less: { | |
bundle: { | |
options: { | |
compress: true | |
,report: 'min' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function deORM( obj, depth = 1, depthLimit = 10 ){ | |
var deWormed = {}; | |
if (depth >= depthLimit){ | |
return {}; | |
} | |
if (isSimpleValue( obj )){ | |
deWormed = obj; | |
} | |
else if (isObject( obj )){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> | |
<dict> | |
<key>background</key> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
fn = "ram://eol.txt"; | |
f = fileOpen( fn, "append", "utf-8" ); | |
fileWriteLine( f, '1' ); | |
fileWriteLine( f, '2' ); | |
fileClose( f ); | |
r = fileRead( fn ); | |
chars = listToArray( r, '' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var store = require('store') //my redux store | |
var unsubscribe | |
var MyComponent = React.createClass({ | |
componentDidMount: function componentDidMount(){ | |
unsubscribe = store.subscribe(function handleStateChange(){ | |
// in ES6 we could do this: this.forceUpdate() | |
// but what is the solution for ES<6? | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[color] | |
ui = auto | |
[core] | |
autocrlf = input | |
excludesfile = /Users/atcodes/.gitignore_global | |
[push] | |
default = tracking | |
[alias] | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr,%an)%Creset' --abbrev-commit --date=relative | |
st = status -sb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var messageStatus = new util.iQuery(" | |
select | |
status | |
from | |
Message | |
where | |
messageId = :id | |
",{ | |
id: { cfsqltype: "cf_sql_numeric", value: batch.messageId[1] } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["alt+up"], "command": "swap_line_up" } | |
,{ "keys": ["alt+down"], "command": "swap_line_down" } | |
,{ "keys": ["ctrl+alt+down"], "command": "duplicate_line" } | |
,{ "keys": ["alt+d"], "command": "run_macro_file", "args": {"file": "Packages/Default/Delete Line.sublime-macro"} } | |
,{ | |
"keys": ["ctrl+alt+left"], | |
"command": "set_layout", | |
"args": { |