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
List of things worth to share about many things. | |
Video: | |
Randy Pausch Last Lecture: Achieving Your Childhood Dreams - https://www.youtube.com/watch?v=ji5_MqicxSo - One of the best video on youtube | |
Randy Pausch Time Managment - https://www.youtube.com/watch?v=oTugjssqOT0 | |
CtizenFour: kind of mind blowing. It's the story of "ed" | |
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
#replace xoxp-*****000 with your token from here https://api.slack.com/web#authentication | |
# for the start | |
do shell script "curl 'https://slack.com/api/dnd.setSnooze?token=xoxp-*****000&num_minutes=$duration'" | |
# for the end and interuption | |
do shell script "curl https://slack.com/api/dnd.endSnooze?token=xoxp-*****000" |
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
#step 1: install library | |
(sudo) pip install git+https://github.com/chinoio/chino-python.git | |
#step 0 create chino wrapper | |
from chino.api import ChinoAPIClient | |
customer_id="<your custimer id>" | |
customer_key="<your cutomer key>" | |
url = "https://api.test.chino.io" | |
chino = ChinoAPIClient(customer_id=customer_id, customer_key=customer_key,url=url) |
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
repository = chino.repositories.create('description') | |
repository_id = repository._id |
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
structure = [{ | |
"name": "physician_id", "type": "string", "indexed":True | |
},{ | |
"name": "patient_birth_date","type": "date", "indexed":True | |
},{ | |
"name": "observation","type": "string","indexed":True | |
},{ | |
"name": "visit_date","type": "datetime","indexed":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
content = { | |
"physician_id": "testId", | |
"patient_birth_date": "1937-06-19", | |
"observation": "The patient was ok.", | |
"visit_date": "2015-02-19T16:39:47.807000" | |
} | |
document = chino.documents.create(schema_id, content) | |
document_id = document._id |
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
document = chino.documents.detail(document_id) | |
print document.content.to_json() #print content, to_json() util function of the libraries |
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
### Keybase proof | |
I hereby claim: | |
* I am esseti on github. | |
* I am esseti (https://keybase.io/esseti) on keybase. | |
* I have a public key whose fingerprint is 5D6C E305 DE5A 324A CB4C BD4A 7533 CEB0 E3B9 6842 | |
To claim this, I am signing this object: |
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
#!/bin/bash | |
#this should be run in a cron task every day or week. | |
#fill in CHANNEL and WEBHOOK URL | |
RESULT="$(barman check all)" | |
RESULT2="$(barman list-backup all)" | |
PAYLOAD='payload={"channel": "<SPECIFY THE CHANNEL>","username": "barman","icon_emoji": ":robot_face:","color": "info","fields": [{"title": "Check","value": "'${RESULT}'","short": False},{"title": "list backup","value": "'${RESULT2}'","short": False}],}' | |
curl -X POST --data "$PAYLOAD" https://hooks.slack.com/services/<YOUR URL> |
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
{% with id=widget.attrs.id %} | |
{% for group, options, index in widget.optgroups %} | |
{% for option in options %} | |
{% with widget=option %} | |
{% include widget.template_name%} | |
{% endwith %} | |
{% endfor %} | |
{% endfor %} | |
{% endwith %} |