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
- After making changes, ALWAYS make sure to start up a new server so I can test it. | |
- Always look for existing code to iterate on instead of creating new code. | |
- Do not drastically change the patterns before trying to iterate on existing patterns. | |
- Always kill all existing related servers that may have been created in previous testing before trying to start a new server. | |
- Always prefer simple solutions | |
- Avoid duplication of code whenever possible, which means checking for other areas of the codebase that might already have similar code and functionality | |
- Write code that takes into account the different environments: dev, test, and prod | |
- You are careful to only make changes that are requested or you are confident are well understood and related to the change being requested | |
- When fixing an issue or bug, do not introduce a new pattern or technology without first exhausting all options for the existing implementation. And if you finally do this, make sure to remove the old implementation afterwards so we d |
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
{ | |
// This is the ruby default | |
"tab_size": 2, | |
// Set to true to insert spaces when tab is pressed | |
"translate_tabs_to_spaces": true, | |
// This shows all your whitespace, including spaces and tabs | |
// helps keep code clean and properly indented! | |
"draw_white_space": "all", |
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
#!/bin/bash | |
# | |
# Provides a function that allows you to choose a JDK. Just set the environment | |
# variable JDKS_ROOT to the directory containing multiple versions of the JDK | |
# and the function will prompt you to select one. JAVA_HOME and PATH will be cleaned | |
# up and set appropriately. | |
_macosx() | |
{ | |
if [ $(uname -s) = Darwin ]; then |
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
(defn isbn13? [isbn13] | |
(let [nums (map #(Integer/parseInt %) (re-seq #"\d" isbn13)) | |
first-nums (butlast nums) | |
sum (->> first-nums | |
(map vector (cycle [1 3])) | |
(map (partial apply *)) | |
(reduce +)) | |
last-num (last nums)] | |
(= last-num | |
(- 10 (mod sum 10))))) |
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
/* | |
* Added additional null checks when closing the ResultSet and Statements. | |
* | |
* Thanks to pihug12 and Grzegorz Oledzki at stackoverflow.com | |
* http://stackoverflow.com/questions/5332149/jdbc-scriptrunner-java-lang-nullpointerexception?tab=active#tab-top | |
*/ | |
/* | |
* Modified: Use logWriter in print(Object), JavaDoc comments, correct Typo. | |
*/ | |
/* |