This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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
{ | |
"preset": "node-style-guide" | |
,"validateIndentation": "\t" | |
,"disallowAnonymousFunctions": true | |
,"disallowSpacesInsideParentheses": { "only": [ "{", "}" ] } | |
,"requireSpacesInsideParentheses": { "all": true, "except": [ "{", "}" ] | |
,"requireSpacesInsideBrackets": { "allExcept": [ "[", "]", "{", "}" ] }} | |
,"requireSpacesInsideObjectBrackets": "allButNested" | |
,"validateParameterSeparator": ", " | |
,"disallowCommaBeforeLineBreak": true |
This file contains hidden or 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
<!--- | |
Many thanks to Sean Corfield and Ryan Guill who set me down the correct path of java.util.TimeZone | |
---> | |
<cfscript> | |
writeDump(label="Conversion Examples",var={ | |
"0-local-tz": getSystemTZ() | |
,"1-local-now": now() | |
,"2-utc-now": toUTC(now()) | |
,"3-eastern-now": TZtoTZ( getSystemTZ(), now(), "America/New_York" ) |
This file contains hidden or 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
[user] | |
name = Adam Tuttle | |
email = [email protected] | |
[color] | |
ui = auto | |
[core] | |
autocrlf = input | |
excludesfile = /Users/adam/.gitignore_global | |
[push] | |
default = tracking |
This file contains hidden or 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
component accessors="true" { | |
property framework; | |
property memberService; | |
function before( rc ){ | |
local.safeEvents = 'main:member.login,main:member.forgot,main:member.resetpassword'; | |
//require login for everything in this controller except login method | |
if (!structKeyExists(session, 'user')){ |
This file contains hidden or 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
component { | |
function getEnvironment(){ | |
if (cgi.server_name contains ".local" or cgi.server_name contains ".dev"){ | |
return "dev"; | |
} | |
if (cgi.server_name contains "qa."){ | |
return "qa"; | |
} | |
return "prod"; |
This file contains hidden or 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> | |
//to initialize to a random number instead of 50, set last to "" | |
last = 50; | |
for(var i = 1; i <= 100; i++){ | |
last = trendingRandom( 0, 100, 12, last ); | |
writeOutput( "#last#<br/>" ); | |
} | |
</cfscript> |
This file contains hidden or 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
{ | |
"dependencies": { | |
"redis": "^0.10.1" | |
} | |
} |