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
| SELECT * FROM city LIMIT 10; | |
| SELECT 1; | |
| SELECT 'Some Thing' as SexyThing; | |
| SELECT 2+2 as adding; | |
| SELECT 2+2, 'foo', 5*5, CONCAT('Mr ', 'Boombastic') as MrMan; | |
| SELECT @a, @b, @c; |
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
| sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL |
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
| sudo find . -type f | xargs chmod -v 664 | |
| sudo find . -type d | xargs chmod -v 775 | |
| sudo chmod -R u=rwX,g=rwX,o=rX . | |
| sudo chown -R ubuntu:www-data . |
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
| emailAddressPattern: /^[a-zA-Z0-9'._%+\-]+@[a-zA-Z0-9\-][a-zA-Z0-9.\-]*\.[a-zA-Z]{2,63}$/; |
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
| Function.prototype.method = function(name, func) { | |
| this.prototype[name] = func; | |
| return this; | |
| } | |
| Function.prototype.extends = function(superclass) { | |
| this.prototype = Object.create(superclass.prototype); | |
| this.prototype.constructor = this; | |
| } |
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
| TimeHolder = {}; | |
| TimeHolder.delay = 2000; | |
| TimeHolder.value = null; | |
| TimeHolder.cancel = function cancel() { | |
| clearTimeout(TimeHolder.value); | |
| TimeHolder.value = null; | |
| }; | |
| window.TimeHolder = TimeHolder; | |
| if (TimeHolder.value === null) { | |
| // Attempting to set a timeout call so that the class does not immediately trigger again. |
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
| var isValidJSON = function isValidJSON(data) { | |
| if (String(data).length === 0) { | |
| return false; | |
| } | |
| try { | |
| var o = JSON.parse(data); | |
| // if o checks for null, empty, or undefined. | |
| // typeof object and not instanceof array makes sure it's an object and not an array. | |
| // the error checker does the rest. | |
| if (o && typeof o === "object" && !(o instanceof Array)) { |
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
| Array.prototype.empty = function empty() { | |
| while (this.length > 0) { | |
| this.pop(); | |
| } | |
| }; |
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
| alias random='echo "$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c12 | xargs echo)"' |
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
| [^\d]+(?<!^[+-]) |