This file contains 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
Tue Nov 21 14:54:36 EST 2023 | panther:requests=0 | |
Tue Nov 21 14:54:40 EST 2023 | panther:requests=490 | |
Tue Nov 21 14:54:44 EST 2023 | panther:requests=490 | |
Tue Nov 21 14:54:49 EST 2023 | panther:requests=480 | |
Tue Nov 21 14:54:53 EST 2023 | panther:requests=480 | |
Tue Nov 21 14:54:57 EST 2023 | panther:requests=472 | |
Tue Nov 21 14:55:02 EST 2023 | panther:requests=470 | |
Tue Nov 21 14:55:06 EST 2023 | panther:requests=466 | |
Tue Nov 21 14:55:11 EST 2023 | panther:requests=462 | |
Tue Nov 21 14:55:15 EST 2023 | panther:requests=458 |
This file contains 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
import requests | |
def get_instance_token(): | |
try: | |
response = requests.put('http://169.254.169.254/latest/api/token', headers={ | |
'X-aws-ec2-metadata-token-ttl-seconds': '21600'}, timeout=0.1) | |
return response.text.strip() | |
except Exception as e: | |
print(f"Error: {e}") |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am takadimi on github. | |
* I am ewoodward (https://keybase.io/ewoodward) on keybase. | |
* I have a public key ASANumesgQNbUeWLsxpVas0qSzI5t_QN_728G_uGr-AM0Ao | |
To claim this, I am signing this object: |
This file contains 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
- Actually learn bash scripting | |
- Learn the basics of awk & sed | |
- Create basic app in swift 3 |
This file contains 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
Show hidden characters
{ | |
"atomic_save": false, | |
"detect_indentation": true, | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"tab_size": 4, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, |
This file contains 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 | |
/* | |
NOTES: | |
As always, coding to an interface is king. | |
Using the strategy pattern you can have a class inject different algorithms for use in their own methods. | |
Representing each algorithm as a class that implements the same interface allows for easily swappable functionality! | |
This file contains 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 | |
interface CustomerSpecification { | |
public function isSatisfiedBy(Customer $customer); | |
} | |
class CustomerIsGold implements CustomerSpecification { | |
public function isSatisfiedBy(Customer $customer) { | |
return $customer->plan == 'gold'; | |
} |
This file contains 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 | |
/* | |
NOTES: | |
Useful for extending/decorating the behavior of an object. | |
Instead of having to compose a matrix of class combinations for | |
your different needs, you define an interface that allows each | |
component to extend the base behavior. This means you can mix and | |
match the different behaviors freely. |
This file contains 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 | |
/* | |
NOTES: | |
This pattern is useful for translating from one interface to another. | |
In the example below, we see that a 'Person' is 'read'ing a book. Consider that | |
the 'BookInterface' may be out of your reach and is already set in stone, what happens | |
if you already have an 'eReaderInterface'? The methods on the 'BookInterface' are equivalent, |
This file contains 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 "octokit" | |
file_name = ARGV[0] | |
description = ARGV[1] | |
if description.nil? then | |
description = '' | |
end | |
if !ARGV.empty? then |
NewerOlder