A simple command line script to grab screenshots of a URL in multiple screen widths (desktop, tablet, mobile, or Twitter Bootstrap breakpoints) using PhantomJS. Useful for quickly generating images of websites or in-the-browser design processes to share with team members of a client.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /bin/sh | |
| # Installation | |
| # - Move this to /etc/init.d/myservice | |
| # - chmod +x this | |
| # | |
| # Starting and stopping | |
| # - Start: `service myservice start` or `/etc/init.d/myservice start` | |
| # - Stop: `service myservice stop` or `/etc/init.d/myservice stop` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| launchctl unload -w /System/Library/LaunchDaemons/com.apple.spindump.plist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Enable Zend OPcache extension module | |
| zend_extension=opcache.so | |
| ; Determines if Zend OPCache is enabled | |
| opcache.enable=1 | |
| ; Determines if Zend OPCache is enabled for the CLI version of PHP | |
| ;opcache.enable_cli=0 | |
| ; The OPcache shared memory storage size. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ~/.tmux.conf | |
| ########################################################################### | |
| # General options | |
| # Default termtype. If the rcfile sets $TERM, that overrides this value. | |
| set -g default-terminal screen-256color | |
| # Ring the bell if any background window rang a bell | |
| set -g bell-action any |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Smart Magento reindexing and cache clearing. Only indexes and caches that are | |
| # invalidate are cleared. Place this file in your shell/ directory and make it | |
| # executable: chmod +x magentoSmartIndexCacheRefresh.sh | |
| # | |
| # Before use it is recommended to consider your failures as a developer due to | |
| # lack of ability to correctly update individual indexes and caches as records | |
| # modified processed. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Here is a sample of the URLs this regex matches: (there can be more content after the given URL that will be ignored) | |
| // http://youtu.be/dQw4w9WgXcQ | |
| // http://www.youtube.com/embed/dQw4w9WgXcQ | |
| // http://www.youtube.com/watch?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/?v=dQw4w9WgXcQ | |
| // http://www.youtube.com/v/dQw4w9WgXcQ | |
| // http://www.youtube.com/e/dQw4w9WgXcQ | |
| // http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| from concurrent.futures import ProcessPoolExecutor | |
| from concurrent.futures import ThreadPoolExecutor | |
| from functools import partial | |
| import aiohttp | |
| import bs4 | |
| import uvloop | |
| import mailer |