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
| #!/bin/bash | |
| # Bash utility that joins every file provided as argument | |
| # and outputs a new file called output.txt. | |
| # bash trap function is executed when CTRL+C is pressed | |
| trap quitprogram INT | |
| quitprogram() { | |
| echo -e "CTRL+C Detected!\nExiting..." | |
| exit |
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
| #!/bin/bash | |
| # loop through parameters | |
| for WORD; do | |
| echo $WORD | |
| done | |
| # another way is: | |
| for i in "$@" | |
| do |
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
| class HelloWorld { | |
| static void Main() { | |
| System.Console.WriteLine("Hello, World!"); | |
| } | |
| } |
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
| JSONArray a = new JSONArray(); | |
| try { | |
| a.put(new JSONObject().put("foo", "bar")); | |
| a.put(new JSONObject().put("bar", "baz")); | |
| } catch (JSONException e) { | |
| // TODO Auto-generated catch block | |
| e.printStackTrace(); | |
| } |
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
| JSONObject o = new JSONObject(); | |
| JSONArray a = new JSONArray(); | |
| try { | |
| o.put("foo", "bar"); | |
| o.put("bool", false); | |
| a.put(1, 123.45); | |
| a.put(2, 123); | |
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
| $("a").on("click", function(e){ | |
| return false; | |
| /* in theory its just like: | |
| * e.preventdefault(); | |
| * e.stopImmediatePropagation(); | |
| * but this is true only when you are using jQuery. | |
| * * * * * * * * * * * * * * * * * * * * * * * * */ | |
| } |
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
| /* Display a confirm box when the user | |
| * clicks on the delete link. | |
| */ | |
| function confirmDeleteHandler(e) { | |
| e = e || window.event; | |
| var target; | |
| target = e.target || e.srcElement; | |
| if ( target.className.match(/\bconfirmDelete\b/) ) { | |
| if (!confirm('Are you sure?')) { | |
| e.preventDefault(); |
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
| # for files | |
| find $1 -type f -print0 | xargs -0 chmod -v 664 | |
| # for folders | |
| find $1 -type d -print0 | xargs -0 chmod -v 775 |
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
| #include <stdio.h> | |
| main() | |
| { | |
| printf("Hello, World!\n"); | |
| } |
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
| !!! | |
| %html | |
| %head | |
| %title CSS 3D Transform | |
| %body | |
| #wrapper | |
| #test | |
| #test2 | |
| #test3 | |
| #light |