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
| require 'fiddle' | |
| require 'pry' | |
| version_dll = Fiddle.dlopen('version.dll') | |
| filename = 'C:/Tools/teraterm/ttermpro.exe' | |
| get_file_version_info_size = Fiddle::Function.new( | |
| version_dll['GetFileVersionInfoSize'], | |
| [Fiddle::TYPE_VOIDP, Fiddle::TYPE_VOIDP], |
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
| { | |
| "editor.renderWhitespace": "boundary", | |
| "breadcrumbs.enabled": true, | |
| "workbench.colorTheme": "One Dark Pro", | |
| "editor.tabSize": 2, | |
| "editor.rulers": [ | |
| 80, | |
| 100, | |
| 120 | |
| ], |
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
| CREATE (:Town {name: 'Heine'}) | |
| CREATE (:Town {name: 'Town of Giran'}) | |
| CREATE (:Town {name: 'Town of Oren'}) | |
| CREATE (:Town {name: 'Town of Dion'}) | |
| CREATE (:Town {name: 'Town of Aden'}) | |
| CREATE (:Town {name: 'Town of Goddard'}) | |
| CREATE (:Town {name: 'Town of Rune'}) | |
| CREATE (:Town {name: 'Town of Schuttgart'}) | |
| CREATE (:Town {name: 'Town of Gludio'}) | |
| CREATE (:Town {name: 'Talking Island Village'}) |
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
| require 'date' | |
| require 'digest' | |
| class Block | |
| attr_reader :data, :hash, :parent, :author, :created_at | |
| def initialize(data:, parent:, author:) | |
| raise ArgumentError.new '`data` should respond to `to_s`' unless data.respond_to?(:to_s) | |
| raise ArgumentError.new '`author` should respond to `to_s`' unless author.respond_to?(:to_s) |
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
| require 'date' | |
| require 'digest' | |
| class Block | |
| attr_reader :data, :hash, :parent, :author, :created_at | |
| def initialize(data:, parent:, author:) | |
| raise ArgumentError.new '`data` should respond to `to_s`' unless data.respond_to?(:to_s) | |
| raise ArgumentError.new '`author` should respond to `to_s`' unless author.respond_to?(:to_s) |
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
| diff --git a/system/libraries/Email.php b/system/libraries/Email.php | |
| index ca9cd1e..9310844 100644 | |
| --- a/system/libraries/Email.php | |
| +++ b/system/libraries/Email.php | |
| @@ -1528,6 +1528,33 @@ class CI_Email { | |
| // -------------------------------------------------------------------- | |
| /** | |
| + * Validate email for shell | |
| + * |
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 crypt { | |
| openssl enc -e -aes256 -a -in $1 -out $2 | |
| } | |
| function decrypt { | |
| openssl enc -d -aes256 -a -in $1 -out $2 | |
| } |
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 | |
| # Checks if services are up by counting the number of processes. | |
| function check_service { | |
| PROCS=$(ps ax | grep "$1" | wc -l) | |
| if [ $PROCS -gt 1 ] ; then | |
| echo -e "[\e[1m\e[32mUP\e[0m]" | |
| else | |
| echo -e "[\e[1m\e[31mDOWN\e[0m]" |
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 | |
| /** Validates a credit card number using the Luhn algorithm. | |
| * http://en.wikipedia.org/wiki/Luhn_algorithm | |
| * | |
| * @param string $card_number The card number (without spaces, dots, or other | |
| * special characters, only the numbers). | |
| * | |
| * @return boolean True if the number is valid, false otherwise. | |
| * |