Command Line Interface (CLI)
Command | Description |
---|---|
./.bash_profile |
this is where you go to set up alias and configure bash. usually found in your home directory. |
man help |
man formats and displays the on-line manual pages. If you specify sec- tion, man only looks in that section of the manual. name is normally the name of the manual page, which is typically the name of a command, function, or file. However, if name contains a slash (/) then man interprets it as a file specification, so that you can do man ./foo.5 or even man /cd/foo/bar.1.gz. |
pwd |
The pwd utility writes the absolute pathname of the current working directory to the standard output. |
which |
The which utility takes a list of command names and searches the path for each executable file that would be run had these commands actually been invoked. |
brew |
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X. more on brew commands |
mkdir |
make a directory |
cp |
copy file or directory |
cat type |
The most common use of cat is to read the contents of files, and cat is often the most convenient program for this purpose. |
xargs |
execute arguments |
find dir-r |
find files |
grep select-string |
find things inside files |
apropos helpctr |
find what man page is appropriate |
env |
look at your enivorment |
echo |
print some arguments |
export set |
export / set a new enviroment variable |
chmod attrib |
change file / directory permissions |
chown icacls |
change file / directory ownership |
for files |
run a command on a group of files |
robocopy |
command-line directory and/or file replication command. Robocopy functionally replaces Xcopy, with more options |
sudo runas |
become super / root user |
less more |
page through a file |
rmdir |
remove directory |
Back to top
Object Oriented Programming
Single responsibility
Code should be:
- Transparent The consequences of change should be obvious in the code that is changing and in distant code that relies upon it
- Reasonable The cost of any change should be proportional to the benefits the change achieves
- Usable Existing code should be usable in new and unexpected contexts
- Exemplary The code itself should encourage those who change it to perpetuate these qualities
A class should do the smallest possible useful thing.
why?
Applications that are easy to change consist of classes that are easy to reuse. Reusable classes are pluggable units of well-defined behavior that have few entanglements. An application that is easy to change is like a box of building blocks; you can select just the pieces you need and assemble them in unanticipated ways.
- Metz, Sandi Practical Object Oriented Design in Ruby (POODR). Crawfordsville: Addison-Wesley, 2013 . Print.
Classes
A class is a blueprint. one blueprint can be used to make many of the same objects for example a house or a bunch of houses, can be based off the same blue print. class are to objects what blueprints are to houses.
Inheritance
Inheritance is, at its core, a mechanism for automatic message
delegation. It defines a forwarding path for not-understood messages. It creates relationships such that, if one object cannot respond to a received message, it delegates that message to another. You don’t have to write code to explicitly delegate the message, instead you define an inheritance relationship between two objects and the forwarding happens automatically.
- Metz, Sandi Practical Object Oriented Design in Ruby (POODR). Crawfordsville: Addison-Wesley, 2013 . Print.
Behavior & Messages
Behavior is what an object can do
Messages are how you get that object to perform that behavoir
Ruby
Syntax
Integer convience methods
String convience methods
Array convience methods
Hash convience methods
Enumerable
Back to topJavascript
Syntax
Integer convience methods
String convience methods
Array convience methods
Object convience methods
Back to topMarkdown cheatsheet
Command | Description |
---|---|
Heading 1 |
# text in between #
|
Heading 2 |
## text in between ##
|
Heading 3 |
### text in between ###
|
Heading 4 |
#### text in between ####
|
Heading 5 |
##### text in between #####
|
Heading 5 |
###### text in between ######
|
italic |
* text in between * or _ text in between _
|
bold |
** text in between ** or __ text in between __
|
bold & italic |
*** text in between *** or ___ text in between ___
|
|
~~ text in between ~~
|
ordered list |
1. text
|
un-ordered list |
* text
|
links without title |
[link without title](https://github.com/lee-egist/markdown_cheatsheet/edit/master/README.md)
|
links with title |
[link with title](https://github.com/lee-egist/markdown_cheatsheet/edit/master/README.md "Erick's Markdown Cheatsheet")
|
link by reference |
[reference-style link][Arbitrary case-insensitive reference text]
somewhere later in document
[arbitrary case-insensitive reference text]: https://github.com/lee-egist/markdown_cheatsheet/edit/master/README.md
|
table |
| header | for | table |
|
Back to top
Git & Github
Git is a version control system gitHub is a webbased application to manage git repositories and colaborate with others. read my post @ lee-egist.github.io
Git cheatsheet
Back to top
HTML
HTML is really to large to cover in one page. Here is a link to a good resource: www.w3school.com
Back to top
Cascading Style Sheets
@media
position
cross-browser compatabliity
Back to top
Sinatra
Some kind of ruby gem?
don't know what i don't know
Back to top
Rails
common commands
command | description |
---|---|
rails new [project-name] | creates a new reails project on your local machine |
rails generate [model, view, controller, migration ...] [class-name] |
creates a model, view, controller etc...with the given class-name. also creates necessary dependent files. |
conventions
routing
Back to topStructured Query Language
Again SQL is a very large topic. Here is a link for beginners W3school/sqlBack to top
D3
Data mapping tool
don't know what I don't know
Back to top