6th April 2019, 1700 hours
Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
- By Edmond Lau
- Highly Recommended 👍
- http://www.theeffectiveengineer.com/
var MARGIN = 28; | |
// Fullscreen | |
slate.bind('f:cmd,alt', function(win) { | |
// ±4 to account for hidden Dock on left of screen. | |
win.doOperation(S.op('move', { | |
'x': 'screenOriginX - 4 + ' + MARGIN, | |
'y': 'screenOriginY + ' + MARGIN, |
I know I'm late with this article for about 5 years or so, but people are still using Python 2.x, so this subject is relevant I think.
Some facts first:
- Unicode is an international encoding standard for use with different languages and scripts
- In python-2.x, there are two types that deal with text.
str
is an 8-bit string.
unicode
is for strings of unicode code points.
Sometimes, your mac is filled up with files and you can't seem to understand what really is taking much space. Here is how you can find out.
- First of all find disk usage and save it to a log file. Also, find all big files that are there. Grepping using 'G' would find all files that are in GB.
Also, save the second list to another file so that we are only doing it once.
#!/bin/bash | |
# based on http://www.snip2code.com/Snippet/165926/Check-for-ipdb-breakpoints-git-hook | |
pdb_check=$(git grep -E -n '[ ;]i?pdb') | |
if [ ${#pdb_check} -gt 0 ] | |
then | |
echo "COMMIT REJECTED: commit contains code with break points. Please remove before commiting." | |
echo $pdb_check | |
exit 1 | |
else |
Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.
/* | |
* Nunjucks + Express | |
* I couldn't find anything that helped me setup the enviornment | |
* correctly for these in the latest vesion of Express 4 (at the time | |
* of writing this). | |
* | |
* This Gist for those that want to keep using Nunjucks with Express 4. | |
* This also goes over working with a Nunjucks environment to use custom | |
* filters, extensions, etc. | |
* |