Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.
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 | |
| // source: http://php.net/manual/de/language.oop5.autoload.php#99173 | |
| class autoloader { | |
| public static $loader; | |
| public static function init() | |
| { | |
| if (self::$loader == NULL) | |
| self::$loader = new self(); |
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 | |
| $js = ""; | |
| $content = file_get_contents("http://website.com"); | |
| preg_match_all('#<script(.*?)</script>#is', $content, $matches); | |
| foreach ($matches[0] as $value) { | |
| $js .= $value; | |
| } |
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 | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
| # | |
| WP_OWNER=www-data # <-- wordpress owner | |
| WP_GROUP=www-data # <-- wordpress group | |
| WP_ROOT=$1 # <-- wordpress root directory |
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 | |
| #By Nate Flink | |
| #Invoke on the terminal like this | |
| #curl -s https://gist.github.com/nateflink/9056302/raw/findreplaceosx.sh | bash -s "find-a-url.com" "replace-a-url.com" | |
| if [ -z "$1" ] || [ -z "$2" ]; then | |
| echo "Usage: ./$0 [find string] [replace string]" | |
| exit 1 | |
| fi |
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
| const CDP = require('chrome-remote-interface'); | |
| const argv = require('minimist')(process.argv.slice(2)); | |
| const file = require('fs'); | |
| // CLI Args | |
| const url = argv.url || 'https://www.google.com'; | |
| const format = argv.format === 'jpeg' ? 'jpeg' : 'png'; | |
| const viewportWidth = argv.viewportWidth || 1440; | |
| const viewportHeight = argv.viewportHeight || 900; | |
| const delay = argv.delay || 0; |
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
| const puppeteer = require('puppeteer'); | |
| //const mkdirp = require('mkdirp'); | |
| const fs = require('file-system'); | |
| // Put your custom dimension and name Here | |
| const devices = [ | |
| { name: 'Highest', width: 1920, height: 1080 }, | |
| { name: 'Laptop-1', width: 1366, height: 768 }, | |
| { name: 'Laptop-2', width: 1360, height: 768 }, | |
| { name: 'Small-Desktop-1', width: 1280, height: 800 }, |
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
| # BEGIN WordPress | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| RewriteRule ^index\.php$ - [L] | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule . /index.php [L] | |
| </IfModule> |
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
| composer require "mdsimpson/contact-form-7-to-database-extension" | |
| composer require "wpackagist-plugin/contact-form-7" | |
| composer require "wpackagist-plugin/duplicate-page" | |
| composer require "wpackagist-plugin/duplicate-post" | |
| composer require "wpackagist-plugin/email-address-encoder" | |
| composer require "wpackagist-plugin/enable-media-replace" | |
| composer require "wpackagist-plugin/favicon-by-realfavicongenerator" | |
| composer require "wpackagist-plugin/redirection" | |
| composer require "wpackagist-plugin/regenerate-thumbnails" | |
| composer require "wpackagist-plugin/relevanssi" |
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
| # A; B Run A and then B, regardless of success of A | |
| # A && B Run B if A succeeded | |
| # A || B Run B if A failed | |
| # A & Run A in background. |