Skip to content

Instantly share code, notes, and snippets.

View azhar22k's full-sized avatar
🐚
Seek and ye shall find

Azhar Khan azhar22k

🐚
Seek and ye shall find
View GitHub Profile
@azhar22k
azhar22k / birthdayProgram.py
Created June 30, 2016 11:44
Program to read birthdate and display birthday month and calculate days till next birthday
#Read birthdate and display birthday manth
import datetime
birthday=input("What is your birthday date['yyyy-mm-dd' format] ")
birthday=datetime.datetime.strptime(birthday,"%Y-%m-%d").date()
print("Birthday month is "+birthday.strftime('%B'))
@azhar22k
azhar22k / DirectorySize.py
Created June 30, 2016 10:21
The following script tells the size of directory in which it is run. Tested on Unix but should also work with with Windows
import os
totalSize = 0
for filename in os.listdir(os.getcwd()):
if not os.path.isfile(os.path.join(os.getcwd(),filename)):
continue
totalSize = totalSize + os.path.getsize(os.path.join(os.getcwd(),filename))
print("Total Size of current working directory is {0:.2f} Kilo bytes".format(totalSize/1024))
@MikeNGarrett
MikeNGarrett / siege
Last active April 3, 2024 03:49
Siege with JSON POST data
# Changed to use content-type flag instead of header: -H 'Content-Type: application/json'
siege -c50 -t60S --content-type "application/json" 'http://domain.com/path/to/json.php POST {"ids": ["1","2","3"]}'
@rxaviers
rxaviers / gist:7360908
Last active April 25, 2024 04:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: