Skip to content

Instantly share code, notes, and snippets.

View esthervillars's full-sized avatar
😀

Esther Villars esthervillars

😀
  • Los Angeles, California
View GitHub Profile
@esthervillars
esthervillars / clean_code.md
Created September 10, 2019 00:46 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@esthervillars
esthervillars / crawl.sh
Created October 12, 2018 20:52 — forked from TotalLag/crawl.sh
modified to warm up cloudflare cache
#!/bin/bash
# warmly.sh
# A wget based, easy, poor man`s cache warmer script
# https://gist.github.com/thomasfr/7926314
# The MIT License (MIT)
#
# Copyright (c) 2013,2014 Thomas Fritz <[email protected]> (http://fritzthomas.com)
#
@esthervillars
esthervillars / Install NVIDIA Driver and CUDA.md
Created June 2, 2017 20:36 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install composer
brew install homebrew/php/composer
### PHPCS
composer global require "squizlabs/php_codesniffer=*"
# Add to your .bash_profile
@esthervillars
esthervillars / petrify.js
Created January 5, 2017 17:58 — forked from reefdog/petrify.js
Redirect a GitHub URL to the last-committed version of that thing.
/*!
* Petrify
* Redirect yourself to a permanent version of a GitHub blob or tree.
*
* Say you're looking at `https://github.com/documentcloud/documentcloud/blob/master/public/javascripts/embed/search_embed.js#L315-L317`
* and you want to link to it in an email or GitHub comment. You realize that,
* when people follow the link years or even days later, it's likely the file
* will have changed so much that those line references won't be the same, and
* people won't know what you were talking about.
*
@esthervillars
esthervillars / custom-submit.js
Created November 13, 2013 08:26 — forked from wladston/custom-submit.js
Angular JS custom submit directive
/**
* Custom submit directive that will only submit when all the validation has passed
* for all the fields. This extends on the ng-submit directive provided by AngularJS.
*
* This directive will also remove the 'pristine' flag from all the fields when
* hitting submit, allowing the form to display no errors until the submit button
* is clicked/enter is pressed.
*
* The variable 'app' is the instance of a module.
* E.g. var app = angular.module('my-app', []);