This is a super simple TCP Chat Server that you can interact with using Netcat (i.e. the nc command on your terminal).
Run the server:
$ ruby tcp.rb
This is a super simple TCP Chat Server that you can interact with using Netcat (i.e. the nc command on your terminal).
Run the server:
$ ruby tcp.rb
| # How does Ruby implement Array#uniq? | |
| # See: https://github.com/ruby/ruby/blob/trunk/array.c#L4140-L4144 | |
| ary = [4,1,2,4,3,2,5] | |
| hsh = {} | |
| # Iterate over the array, adding each element to the hash | |
| ary.each { |el| hsh[el] = el } | |
| hsh |
| Verifying my Blockstack ID is secured with the address 1JTr9JrYzBPC6rirQLjcALiKxGgUqtzRJA https://explorer.blockstack.org/address/1JTr9JrYzBPC6rirQLjcALiKxGgUqtzRJA |
| { | |
| ":smile:": "😄", | |
| ":laughing:": "😆", | |
| ":blush:": "😊", | |
| ":smiley:": "😃", | |
| ":relaxed:": "☺️", | |
| ":smirk:": "😏", | |
| ":heart_eyes:": "😍", | |
| ":kissing_heart:": "😘", | |
| ":kissing_closed_eyes:": "😚", |
| // ==UserScript== | |
| // @name Instagram Stream JK Navigation | |
| // @description Adding J/K key navigation to instagram's new online stream | |
| // @version 1.0.0 | |
| // @author Pedro Gaspar | |
| // @include http://www.instagram.com/* | |
| // @include http://instagram.com/* | |
| // ==/UserScript== | |
| // a function that loads jQuery and calls a callback function when jQuery has finished loading |
| class T(object): | |
| """ | |
| This class shows how to create dynamic attributes that are only processed when called directly for the first time. | |
| After the first call, it returns the previously fetched value. | |
| The dynamic attributes must be in the _dynamic dictionary and must have a processing method with the following name: | |
| get_<dynamic_attribute_name>(self) | |
| """ | |