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 | |
if ( !defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
add_action( 'init', 'rename_media_files_init' ); | |
function rename_media_files_init() { | |
add_filter( 'attachment_fields_to_edit', 'rename_media_files_fields_to_edit', 11, 2 ); | |
add_filter( 'attachment_fields_to_save', 'rename_media_files_attachment_fields_to_save', 11, 2 ); | |
} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<title>Scheduled interruption of our services</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<meta name="description" content="Scheduled interruption of our services"/> | |
<style type="text/css"> | |
body, td{ | |
font-size: 14px; | |
font-family: Arial, sans-serif; |
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 href="imessage://[email protected]">Send iMessage to a Mac</a> | |
<a href="sms://[email protected]">Send iMessage to iOS</a> |
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
(function ($) { | |
$.fn.fblikecount = function (options) { | |
var defaults = { | |
baseUrl: 'http://graph.facebook.com/?ids=' | |
// Likes | |
// baseUrl: 'http://graph.facebook.com/ | |
}; | |
var options = $.extend(defaults, options); | |
var count = 0; | |
return this.each(function () { |
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 | |
base_path=__PATH__ | |
if type -P jpegtran &>/dev/null; then | |
echo 'Running jpegtran'; | |
find $base_path -iname "*.jpg" -type f -exec jpegtran -outfile '{}' -copy none -optimize -progressive '{}' \; | |
else | |
echo 'jpegtran not found'; | |
fi | |
if type -P pngcrush &>/dev/null; then | |
echo 'Running pngcrush'; |
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
(function ($) { | |
$.fn.filestyle = function (options) { | |
var settings = { | |
width: 250 | |
}; | |
if (options) { | |
$.extend(settings, options); | |
} | |
return this.each(function () { | |
var self = this; |
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
::-webkit-scrollbar { | |
width: 8px; | |
} | |
::-webkit-scrollbar:horizontal { | |
display: none; | |
} | |
::-webkit-scrollbar-track { | |
margin-top: 20px; | |
margin-bottom: 20px; | |
border-width: 21px 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
ALTER DATABASE __databasename__ DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; | |
ALTER TABLE __tablename__ CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; |
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
rails console | |
Admin.create(email: "__email__", password: "__password__", password_confirmation: "__password__") |