In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
/** | |
* 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', []); |
/*! | |
* 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. | |
* |
# 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 |
"by Karen Casella, Phillipa Avery, Robert Reta, Joseph Breuer\n\nEarly in 2016, several Netflix teams were asked the question: “What would it take to allow members to download and view content offline on their mobile devices?”\n\nFor the Playback Licensing team, this meant that we needed to provide a content licensing system that would allow a member’s device to store and decrypt the downloaded content for offline viewing. To do this securely would require a new service to handle a complex set of yet-to-be defined business validations, along with a new API for client and server interactions. Further, we determined that this new service needed to be stateful, when all of our existing systems were stateless.\n\n“Great! How long will that take you?”\n\nIn late November 2016, nine short months after
#!/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) | |
# |
PHP Notice: Undefined index: sizes in /var/app/current/wp-content/plugins/s3-media-renamer/admin/class-s3-media-renamer-admin.php on line 284 | |
PHP Warning: Invalid argument supplied for foreach() in /var/app/current/wp-content/plugins/s3-media-renamer/admin/class-s3-media-renamer-admin.php on line 285 | |
PHP Notice: Undefined index: bucket in /var/app/current/wp-content/plugins/s3-media-renamer/admin/class-s3-media-renamer-admin.php on line 299 | |
AWS S3 Copy Exception: The specified method is not allowed against this resource., | |
PHP Notice: Undefined index: extension in /var/app/current/wp-content/plugins/s3-media-renamer/admin/class-s3-media-renamer-admin.php on line 264 | |
PHP Warning: Illegal string offset 'key' in /var/app/current/wp-content/plugins/s3-media-renamer/admin/class-s3-media-renamer-admin.php on line 271 | |
PHP Notice: Uninitialized string offset: 0 in /var/app/current/wp-content/plugins/s3-media-renamer/admin/class-s3-media-renamer-admin.php on line 271 | |
PHP Warning: Illegal string offset 'key' in |
Reverting changes to develop or master (Rolling Forward). | |
To revert a merge to develop (e.g. a pull request), generate a commit that is the reverse of the pull request merge | |
git revert -m 1 <sha> | |
See example PR ... | |
Adding back reverted changes to develop or master | |
To add back reverted changes, cut a new branch and generate a patch from the original commit/merge |
sudo openssl req \ | |
-newkey rsa:2048 \ | |
-x509 \ | |
-nodes \ | |
-keyout certificates/localhost.key \ | |
-new \ | |
-out certificates/localhost.crt \ | |
-subj /CN=Hostname \ | |
-reqexts SAN \ |
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.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.