Skip to content

Instantly share code, notes, and snippets.

View danish-wani's full-sized avatar
💭
Working

Danish Wani danish-wani

💭
Working
View GitHub Profile
@peterhurford
peterhurford / readable-code.md
Last active September 23, 2024 09:45
How do you write readable code?: 13 Principles

How do you write readable code?: 13 Principles

"Programs should be written for people to read, and only incidentally for machines to execute." -- Structure and Interpretation of Computer Programs

"How would you define good code? [...] After lots of interviews we started wondering if we could come out with a definition of good code following a pseudo-scientific method. [...] The population is defined by all the software developers. The sample consists of 65 developers chosen by convenience. [...] The questionnaire consists in a single question: “What do you feel makes code good? How would you define good code?”. [...] Of those, the most common answer by far was that the code has to be Readable (78.46%), almost 8 of each 10 developers believe that good code should be easy to read and understand." -- "What is Good Code: A Scientific Definition"

@alvinchow86
alvinchow86 / migration_manifest.py
Created May 15, 2017 22:54
django-tips-blog-migration-manifest
def handle(self, *app_labels, **options):
# Generate a migrations manifest with latest migration on each app
super(Command, self).handle(*app_labels, **options)
loader = MigrationLoader(None, ignore_no_migrations=True)
apps = sorted(loader.migrated_apps)
graph = loader.graph
with open('latest_migrations.manifest', 'w') as f:
for app_name in apps:
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active October 28, 2024 19:15
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production