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
| /** | |
| * Implements add_to_assoc_numeric | |
| * | |
| * Goal of this function is to allow us to modify an associative, numeric array | |
| * (one that uses string numbers as keys, so there is no 0,1,2,3 ordering, but | |
| * rather the ordering is based on when the keys were inserted [they are treated | |
| * like other string keys]). If we modify this array using array_unshift or | |
| * array_shift, we destory this associative, numeric structure (each key is | |
| * destroyed and the array is simply renumbered, with ints, from 0 to num_elems), | |
| * which we don't want. This function will allow us to insert a new value anywhere |
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 Fixnum | |
| def seconds | |
| self | |
| end | |
| def minutes | |
| self * 60 | |
| end | |
| def hours | |
| self * 60 * 60 | |
| end |
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
| # | |
| # TEXT ANALYZER | |
| # BY: Hayden Chudy | |
| # | |
| # basic setup for text analysis | |
| stopwords = %w{the a by on for of are with just but and to the my I has some in} | |
| lines = File.readlines(ARGV[0]) | |
| line_count = lines.size | |
| text = lines.join |
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
| # Simple example of basic object oriented concepts and how they work in Ruby | |
| # | |
| # AUTHOR: HAYDEN CHUDY | |
| # First is instance and class variable example | |
| # parent class, keep track of the count of all its children | |
| class Shape | |
| # count class variable. Keeps count of all shapes we have made, in general |
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
| # On Virtual Box? | |
| # Ensure your networking type is bridged interface or this will fail | |
| sudo vim /etc/network/interfaces | |
| # comment (#) out all lines that are there and add this to the bottom (however, replace | |
| # the * in the address with whatever you want the static IP to be, e.g., my goal is a | |
| # static IP of: 192.168.1.140, so the address line should be: address 192.168.1.140): | |
| auto lo eth0 |
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
| /** | |
| * This binding has required parameters and should be an object, they are: | |
| * | |
| * observable - the observable we want to look at and evaluate to see if we | |
| * should change focus | |
| * | |
| * evaluator - a function to determine if we should change focus. It should | |
| * return true whenever we want to change focus and false otherwise, see | |
| * below for how to add extra arguments onto the function. Any function can | |
| * be used as long as you can provide the correct scope for it from the HTML |
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 | |
| //I don't play this mismatched boolean logic bullshit, its true or | |
| // false, never 1 or 0 | |
| $bool_replaces = [ | |
| '0' => false, | |
| "1" => true, | |
| false => false, | |
| true => true, | |
| 0 => false, | |
| 1 => true, |
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
| Host * | |
| ServerAliveInterval 10 | |
| IdentitiesOnly yes | |
| Cipher blowfish | |
| Ciphers blowfish-cbc | |
| AskPassGUI no | |
| CheckHostIP yes | |
| Compression no | |
| ForwardAgent no | |
| ForwardX11 no |
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
| ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAvfyNPxR68k0zfNOXIHMipMwPqHie3JBzoyusrZHlDC8O0CEjP3iDppVZrfMgRJlEB4EhZcXKb45Mc7LeJd4aLOK7//GzG46p98+8rg0ursBlX5iL0zDJUn42M7a2hLWuRiB1DcIuyeQNp8fux0N4ur7HizDLtnUk20xsKfV6L55OsMszC0nTV+CW2hmKUkWbxer339u87duie0iE57cs/WyTZDiLeWZJQ4pOUpR95nu0dqUdgU1nnPxQmSI2bnsQ+9TqwSqvoXaZTpG0vUX6PzNYaLHuCOCA5XFPnNVVEkAjGf5Py8Om1YH/cAZh2o7cc0ZV9D5sYljapBnKRSH4Aw== hjc1710@gmail.com |
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
| no-screensaver () { | |
| COUNTER=0; | |
| while [ $COUNTER -ne "-1" ]; do | |
| xdotool mousemove $COUNTER 0 | |
| COUNTER=$(echo "$COUNTER + 5" | bc) | |
| if [ $COUNTER -eq "255" ]; then | |
| COUNTER=0 | |
| fi | |
| sleep 7m; | |
| done |
OlderNewer