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
Working in terminal | |
cd | Change directory | |
ls | List directory | |
ls -al | List all files with permissions showned | |
mv | Change file name, mv #filename1 #filename2 | |
mv * .. | Move everything up one directory | |
rm | Remove file, rm #filename | |
wget | Download a file, wget #filelocation | |
tar --xzvf | Extract .gz file, tar --xzvf #filename |
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
Composer Commands: | |
composer self-update | Update composer for Windows environment |
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
Install Package control first: https://sublime.wbond.net/installation | |
Great Sublime plugins to have: | |
LESS | |
Git | |
Gist | |
GitGutter | |
Emmet | |
PlainTasks | |
WordPress Developer Resources |
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
JavaScript Notes | |
========================================================== | |
To declare an object | |
========================================================== | |
function Rectangle(w, h) { | |
this.width = w; | |
this.height = h; | |
}; | |
========================================================== | |
Create a new instance of the object |
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
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.Iterator; | |
import java.util.ListIterator; | |
import java.util.Set; | |
public class Main { | |
public static void main(String[] args) { | |
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
Eclipse Commands | |
ctrl+shift+o | Organize packages import | |
alt+shift+j | Add a Javadoc comment | |
ctrl+alt+down | Duplicate selected line of code | |
alt+up | Move current line up |
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
import java.util.HashMap; | |
public class Main { | |
public static void main(String[] args) { | |
// HashMap works like associate array | |
HashMap<String, String> map = new HashMap<String, String>(); | |
map.put("California", "Sacramento"); | |
map.put("Oregon", "Salem"); |
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
import java.util.ArrayList; | |
public class Main { | |
public static void main(String[] args) { | |
/** | |
* ArrayList in Java is for create dynamic arrays | |
*/ |
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
public class Main { | |
public static void main(String[] args) { | |
String[][] states = new String[3][2]; | |
states[0][0] = "California"; | |
states[0][1] = "Sacremento"; | |
states[1][0] = "Oregon"; |
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
<?php | |
$images = array( | |
'logo.png', | |
'background.jpg', | |
'http://www.hardcoregamer.com/wp-content/uploads/2014/03/BAK_Sshot019.jpg' | |
); | |
foreach ($images as $image) { | |
$src = (substr($image,0,4) == 'http') ? $image : "images/$image"; |