Skip to content

Instantly share code, notes, and snippets.

Panos Paganis Mallinanga

Block or report user

Report or block Mallinanga

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Mallinanga / wp.php
Created Dec 8, 2013
WordPress Media Library rename files
View wp.php
if ( !defined( 'ABSPATH' ) ) {
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 );
Mallinanga / maintenance.html
Last active Dec 26, 2015
Scheduled interruption of our services
View maintenance.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="en" lang="en">
<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;
Mallinanga / asset.html
Created Oct 13, 2013
imessage from html
View asset.html
<a href="imessage://">Send iMessage to a Mac</a>
<a href="sms://">Send iMessage to iOS</a>
Mallinanga / s.js
Created Jun 4, 2013
#jquery Facebook like & share counts
View s.js
(function ($) {
$.fn.fblikecount = function (options) {
var defaults = {
baseUrl: ''
// Likes
// baseUrl: '
var options = $.extend(defaults, options);
var count = 0;
return this.each(function () {
Mallinanga /
Created Mar 31, 2013
#shell Minify images
if type -P jpegtran &>/dev/null; then
echo 'Running jpegtran';
find $base_path -iname "*.jpg" -type f -exec jpegtran -outfile '{}' -copy none -optimize -progressive '{}' \;
echo 'jpegtran not found';
if type -P pngcrush &>/dev/null; then
echo 'Running pngcrush';
Mallinanga / s.js
Created Mar 25, 2013
#jquery Style file inputs
View s.js
(function ($) {
$.fn.filestyle = function (options) {
var settings = {
width: 250
if (options) {
$.extend(settings, options);
return this.each(function () {
var self = this;
Mallinanga / s.css
Created Mar 15, 2013
#css WebKit scrollbar
View s.css
::-webkit-scrollbar {
width: 8px;
::-webkit-scrollbar:horizontal {
display: none;
::-webkit-scrollbar-track {
margin-top: 20px;
margin-bottom: 20px;
border-width: 21px 0;
Mallinanga / s.sql
Created Mar 14, 2013
#db Alter database/table charset/collation
View s.sql
ALTER DATABASE __databasename__ DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
ALTER TABLE __tablename__ CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
Mallinanga / s.rb
Last active Oct 12, 2015
#ruby Splendid Bacon create administrator
View s.rb
rails console
Admin.create(email: "__email__", password: "__password__", password_confirmation: "__password__")
You can’t perform that action at this time.