This file contains 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 | |
/* | |
Plugin Name: Link PDF Attachment | |
Plugin URI: http://premium.wpmudev.org | |
Description: Adds a link to the top of a WordPress post to the first PDF attachment | |
Author: Chris Knowles | |
Version: 1.0 | |
Author URI: http://twitter.com/ChrisKnowles | |
*/ |
This file contains 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 | |
/** | |
* Plugin name: Site Title (and Tagline) Smilies | |
* Description: Demonstration of selective refresh in the Customizer. Selectors are targeting elements in Twenty Fifteen. | |
* Author: Weston Ruter, XWP | |
* Plugin URL: https://gist.github.com/westonruter/a15b99bdd07e6f4aae7a | |
* | |
* @package SiteTitleSmilies | |
*/ |
This file contains 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
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
@media (min-width:1281px) { /* hi-res laptops and desktops */ } |
This file contains 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 | |
// The this code migrate to github project: https://github.com/romanitalian/Leetify | |
/** | |
* Class Leetify | |
* Leetify::encode('leet'); // "133+" | |
* Leetify::decode('133+'); // "leet" | |
*/ | |
class Leetify | |
{ |
This file contains 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
# Alias definitions. | |
# You may want to put all your additions into a separate file like | |
# ~/.bash_aliases, instead of adding them directly in .bashrc. | |
# | |
# if [ -f ~/.bash_aliases ]; then | |
# . ~/.bash_aliases | |
# fi | |
# | |
# Reload bash with this command: . ~/.bashrc | |
# |
This file contains 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 | |
/* | |
* Generate xkcd style password from /usr/share/dict/words | |
* | |
* http://xkcd.com/936/ | |
* apt-get install wamerican | |
*/ | |
if (!function_exists('wp_generate_password')) : | |
$filesize = @filesize('/usr/share/dict/words'); | |
if ($filesize !== false): |
This file contains 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 | |
# | |
# chmodr.sh | |
# | |
# author: Francis Byrne | |
# date: 2011/02/12 | |
# | |
# Generic Script for recursively setting permissions for directories and files | |
# to defined or default permissions using chmod. | |
# |
This file contains 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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class EnsureQueueListenerIsRunning extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
This file contains 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
#export frames | |
avconv -i hatari.avi -vf fps=10 frames/ffout%03d.png | |
#assemble frames a gif | |
convert -loop 0 frames/ffout0*.png new.gif |
This file contains 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
# force HTTPS and www. | |
RewriteEngine On | |
RewriteCond %{HTTP_HOST} (?!^www\.)^(.+)$ [OR] | |
RewriteCond %{HTTPS} off | |
RewriteRule ^ https://www.%1%{REQUEST_URI} [R=301,L] | |
# alternative way | |
RewriteCond %{HTTP_HOST} !^$ | |
RewriteCond %{HTTP_HOST} !^www\. [NC] |
OlderNewer