A curated list of arrrrrrrrr!
| /** | |
| * Will gracefuly scroll the page | |
| * This function will scroll the page using | |
| * an `ease-in-out` effect. | |
| * | |
| * You can use it to scroll to a given element, as well. | |
| * To do so, pass the element instead of a number as the position. | |
| * Optionally, you can pass a `queryString` for an element selector. | |
| * | |
| * The default duration is half a second (500ms) |
| const scrollToItemId = (containerId, srollToId) => { | |
| const scrollContainer = document.getElementById(containerId); | |
| const item = document.getElementById(scrollToId); | |
| //with animation | |
| const from = scrollContainer.scrollTop; | |
| const by = item.offsetTop - scrollContainer.scrollTop; | |
| if (from < item.offsetTop) { | |
| if (item.offsetTop > scrollContainer.scrollHeight - scrollContainer.clientHeight) { | |
| by = (scrollContainer.scrollHeight - scrollContainer.clientHeight) - scrollContainer.scrollTop; |
| <?php namespace App\Providers; | |
| use Illuminate\Support\ServiceProvider; | |
| use Request; | |
| use View; | |
| use App; | |
| abstract class ApplicationsServiceProvider extends ServiceProvider | |
| { | |
| public function register() |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
| <?php | |
| function multiple_download(array $urls, $save_path = '/tmp') | |
| { | |
| $multi_handle = curl_multi_init(); | |
| $file_pointers = []; | |
| $curl_handles = []; | |
| // Add curl multi handles, one per file we don't already have | |
| foreach ($urls as $key => $url) { |
| #!/bin/bash | |
| # | |
| # Bash script to setup headless Selenium (uses Xvfb and Chrome) | |
| # (Tested on Ubuntu 12.04) trying on ubuntu server 14.04 | |
| # Add Google Chrome's repo to sources.list | |
| echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list | |
| # Install Google's public key used for signing packages (e.g. Chrome) | |
| # (Source: http://www.google.com/linuxrepositories/) |
| document.getElementsByTagName('button')[0].onclick = function () { | |
| scrollTo(document.body, 0, 1250); | |
| } | |
| function scrollTo(element, to, duration) { | |
| var start = element.scrollTop, | |
| change = to - start, | |
| currentTime = 0, | |
| increment = 20; | |
I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.
These are the steps I went through to set up an SSL cert.