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
echo "something==" | base64 -d | zstd -d | cat |
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
echo -e '\x1dclose\x0d' | telnet google.com 80 |
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
import random, math | |
def output_card_value(card_value): | |
if card_value > 1 and card_value < 11: | |
print(card_value) | |
elif card_value == 11: | |
print("Jack") | |
elif card_value == 12: | |
print("Queen") | |
elif card_value == 13: |
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
[ | |
{ | |
"id": "699af9de.c896a8", | |
"type": "location", | |
"z": "22a7d869.b5f338", | |
"parameters": { | |
"location": "api-request-response", | |
"target": "", | |
"info": "" | |
}, |
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
cashPayment = 45000 | |
amountTendered = 100000 | |
changeDue = amountTendered – cashPayment | |
print("Cash payment amount: ", cashPayment) | |
print("Tendered amount: ", amountTendered) | |
print("Change due: ", changeDue) | |
hundredThousands = changeDue / 100000; | |
hundredThousands = int(hundredThousands) |
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
If you use SSH to connect to remote Linux servers, you'll notice that if you keep your SSH session inactive for some time and then try to use it again, the SSH session disconnects with an error message like this: | |
:client_loop: send disconnect: Broken pipe | |
On some systems, it will display 'Write failed: Broken pipe' or 'Connection closed by remote host'. | |
Let's see what causes this error and how to go about keeping your SSH connection alive. | |
Fixing broken pipe error with SSH | |
As you may have guessed, the SSH connection is closed because of inactivity. There is no set value but it usually around 5 minutes or so. |
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
[ | |
{ | |
"id": "c78b305a.d4fc48", | |
"type": "tab", | |
"parameters": { | |
"label": "CounterComponent", | |
"disabled": false, | |
"info": "" | |
}, | |
"is_user_parameter": {}, |
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 a mac, `brew install awscli gnu-sed` before. | |
streamname=staging;aws kinesis describe-stream --stream-name $streamname --output text | grep SHARDS | awk '{print $2}' | while read shard; do aws kinesis get-shard-iterator --stream-name $streamname --shard-id $shard --shard-iterator-type LATEST --output text | while read iterator; do while output=`aws kinesis get-records --shard-iterator $iterator --output text`; do iterator=`echo "$output" | head -n1`; echo "$output" | gsed 1d | grep RECORDS | while read record; do echo $record | awk '{print $2}' | base64 -D; done; done; done; done |
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
//CUSTOMIZER VARIABLES | |
// The number of columns in the tray. | |
number_of_columns = 10; // [1:20] | |
// The number of rows in the tray. | |
number_of_rows = 5; // [1:20] | |
// The diameter of each tray hole in mm. | |
diameter = 10.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
#!/usr/local/bin/python3 | |
import requests,json,getpass | |
import sys,os | |
import certifi,urllib3 | |
def post_request(target_url,dataobj=None,headerobj=None): | |
if headerobj==None: | |
response = requests.post(target_url,data=json.dumps(dataobj),timeout=5, verify=True) | |
elif dataobj==None: |
NewerOlder