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
http://martineau.tv/2014/07/sublime-text-for-front-end-development/ | |
http://www.sitepoint.com/10-essential-sublime-text-plugins-full-stack-developer/ | |
http://ipestov.com/the-best-plugins-for-sublime-text/ | |
https://css-tricks.com/sublime-text-front-end-developers/ | |
Package Control | |
SublimeLinter https://github.com/SublimeLinter/SublimeLinter-jshint | |
scsslint https://packagecontrol.io/packages/SublimeLinter-contrib-scss-lint | |
& jshint are particularly useful. |
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
use "johnson_hw.sml"; | |
val name_hw = "2005 - Assignment Two" | |
(*Unit tests are of format string*bool where bool is represented by evaluation of a function to an expected value*) | |
val tests = [ | |
]; | |
print ("\n"^Int.toString(List.length(tests))^" TOTAL TESTS RUN----------------------"^name_hw^"--------------------------\n"); (*Name display to assert correct test file is running*) | |
fun all_tests(tests) = |
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
val l2s = List.foldl (fn(e,acc)=> acc^" "^Int.toString(e)) "" | |
val ll2s = List.foldl (fn(e,acc)=>acc^"\n "^(l2s e)) "" | |
fun display [] = (print "\n END") | |
| display (l::lls) = (print ("\n "^(l2s l)); display lls) |
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
(*Source: http://www.webber-labs.com/mpl/source%20code/Chapter%20Twelve/quicksort.sml.txt *) | |
fun quicksort nil = nil | |
| quicksort (pivot :: rest) = | |
let | |
fun split(nil) = (nil,nil) | |
| split(x :: xs) = | |
let | |
val (below, above) = split(xs) | |
in | |
if x < pivot then (x :: below, above) |
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
fun c2s (s,r) = | |
let val r = Int.toString r | |
in case s of | |
Spade => " (Spade,"^r^")" | |
| Heart => " (Heart,"^r^")" | |
| Diamond => " (Diamond,"^r^")" | |
| Club => " (Club,"^r^")" | |
end | |
fun cl2s lst = List.foldl (fn(c,acc)=> acc^(c2s c)) "" lst |
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
http://christoph.ruegg.name/blog/git-howto-revert-a-commit-already-pushed-to-a-remote-reposit.html | |
git push origin +2f90b076c3c8349adca4883497a24aed4d8d4a54^:master |
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
https://stackoverflow.com/questions/24472596/git-fatal-pathspec-is-in-submodule/24473037#24473037 | |
Problem: | |
I was unable to commit changes to a repository I cloned as a subdirectory to my existing project directory. | |
✘ ☪ ~/Documents/Python master± git add fullstack/vagrant/forum/*.* | |
fatal: Pathspec 'fullstack/vagrant/forum/forum.py' is in submodule 'Python/fullstack' | |
In this case, Python is the main project directory I would commit to github. | |
fullstack is a repo I cloned from udacity as a subdirectory. |
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
Score = namedtuple("Score", 'Id W L D') | |
p1s = Score(p1, 1, 0, 0) | |
p2s = Score(p2, 0, 1, 0) | |
c.execute("update players set wins = wins + {0.W}, losses = losses + {0.L}, draws = draws + {0.D} where id={0.Id}".format(p1s)) |
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
BOOKMARK | |
Toggle: CMD F2 | |
Next: F2 | |
GOTO | |
Functions etc: CMD R | |
EDIT NAVIGATION | |
PREV EDIT: CMD SHFT OPT K | |
NEXT EDIT: CMD SHFT OPT J |
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
git log --> obtain commit id | |
git branch newbranch | |
git reset --hard a1b2c3d4 | |
(git checkout newbranch) if need be | |
http://stackoverflow.com/questions/1628563/move-the-most-recent-commits-to-a-new-branch-with-git | |
Two push issues: | |
1) On master when doing push you get following error: |
OlderNewer