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
self.__precacheManifest = [].concat(self.__precacheManifest || []); | |
workbox.setConfig({ debug: true }); // show debugging even during development | |
workbox.precaching.suppressWarnings(); | |
workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); | |
console.log("%c Workbox is activated", "font-size: 30px; color: blue"); | |
// Enable offline analytics | |
workbox.googleAnalytics.initialize(); |
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
""" | |
DISCLAIMER | |
I am not responsible for any actions or usage of this API, the api clearly states | |
"Restricted Access. We may pursue legal actions over unauthorized uses of this API." | |
This script is for educational purposes ONLY | |
""" |
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
# Today I Learned using if/else in list comprehension is not as straight forward | |
# Correct | |
list_of_values = [a if a else 2 for a in [0, 1, 0, 3]] | |
# Correct | |
list_of_values = [a for a in [0, 1, 0, 3] if a] | |
# Wrong : Raises Syntax Error | |
list_of_values = [a if a for a in [0, 1, 0, 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
import requests | |
import shutil | |
import json | |
# Writing a json response from an API to file | |
r = requests.get('http://api.domain.com') | |
with open('file.json', 'w') as f: | |
json.dump(r.json(), f, indent=2) | |
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
# First you update your system | |
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y | |
# Cleanup system | |
sudo apt-get purge account-plugin-facebook | |
sudo apt-get purge account-plugin-flickr | |
sudo apt-get purge account-plugin-google | |
sudo apt-get purge aisleriot | |
sudo apt-get purge fonts-opensymbol libreoffice libreoffice-\* openoffice.org-dtd-officedocument1.0 python\*-uno uno-libs3-\* ure ure-dbg | |
sudo apt-get purge gnome-terminal |
Here is a non-exhaustive list of books that have influenced how I think about software.
- RESTful Web Services - Leonard Richardson - THE book on REST
- Clean Code - Robert C. Martin - The book on how to write code sensibly, vital for new programmers
- 97 Things Every Programmer Should Know - Kevlin Henney - Tips and tricks, similar to Clean code but much more bit-size. Perfect toilet reading
- [Don't Make Me Think! - Steve Krug](http://www.amazon.co.uk/Dont-Make-Me-Think-Usability/dp/0321965515/ref=sr_1_1?s=books&ie=UTF8&qid=1439306124&sr=1-1&keywords=Don%27t+Make+Me+Think%21+-+Steve+K
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
- Ensure any install or build dependencies are removed before the end of the layer when doing a