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
| /** Defines a Point. */ | |
| export interface Point { | |
| x: number; | |
| y: number; | |
| } | |
| /** | |
| * Creates a grid that returns an array for laying out objects in a grid. | |
| * | |
| * @param columns An integer representing the number of columns to be created |
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
| server { | |
| listen 80; | |
| server_name adtweb; | |
| # root directive should be global | |
| root /Users/drinkspiller/Sites/adt_web/; | |
| index index.php; | |
| location / { |
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
| (* | |
| * Finder Open iTerm Here - v1.0.2 - 4/14/2011 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2011 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| *) | |
| tell application "Finder" |
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
| (* | |
| * Finder Open iTerm Here - v1.0.2 - 4/14/2011 | |
| * http://benalman.com/ | |
| * | |
| * Copyright (c) 2011 "Cowboy" Ben Alman | |
| * Dual licensed under the MIT and GPL licenses. | |
| * http://benalman.com/about/license/ | |
| *) | |
| tell application "Finder" |
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
| <?php | |
| /** | |
| * Formats a JSON string for pretty printing | |
| * | |
| * @param string $json The JSON to make pretty | |
| * @param bool $html Insert nonbreaking spaces and <br />s for tabs and linebreaks | |
| * @return string The prettified output | |
| * @author Jay Roberts | |
| */ |
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
| # Test URI | |
| # Ignore netbeans folder | |
| nbproject/* | |
| # Ignore private folder | |
| /app/private/* | |
| !/app/private/empty | |
| # Ignore packed asset files | |
| /app/webroot/css/packed/* |
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
| // Generates a URL-friendly "slug" from a provided string. | |
| // For example: "This Is Great!!!" transforms into "this-is-great" | |
| // | |
| // to specify custom replacement string: generateSlug("this is a test", "_"); | |
| // becomes: "this_is_a_test" | |
| function generateSlug (value, replacement) { | |
| // 1) convert to lowercase | |
| // 2) remove dashes and pluses | |
| // 3) replace spaces with dashes | |
| // 4) remove everything but alphanumeric characters, dashes, and any custom replacement string |
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 | |
| human_filesize() { | |
| local fsize=$1 | |
| echo "fsize = $fsize" | |
| declare -a units=(' B', ' KB', ' MB', ' GB', ' TB') | |
| for (( i=0; $fsize > 1024; i++ )) | |
| do | |
| local fsize=$(echo "scale=2;$fsize/1024" | bc ) | |
| echo "now fsize = $fsize" | |
| done |
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
| $ filesize="352533523322523" | |
| $ fsize=$(echo "scale=2;$filesize/1024" | bc ) | |
| bash: 344271018869.65: command not found |
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
| $("input[type=button].mais").click(function() { | |
| $(this).prev().val(parseFloat($(this).prev().val()) + 1); | |
| console.log("Sending ID: " + $(this).attr('id')); | |
| var data = {id: $(this).attr('id'), | |
| quantidade: 1}; | |
| $.ajax({ | |
| type: 'POST', | |
| url: 'http://127.0.0.1/Conveniencia/session/add', | |
| data: data | |
| }); |
NewerOlder