Skip to content

Instantly share code, notes, and snippets.

Avatar

Yakir Sitbon KingYes

View GitHub Profile
View wordpress-favicon.php
<?php
function pojo1029_show_favicon() {
?>
<link rel="apple-touch-icon" sizes="57x57" href="http://www.example.com/apple_touch_icon_iphone.png" />
<link rel="apple-touch-icon" sizes="72x72" href="http://www.example.com/apple_touch_icon_ipad.png" />
<link rel="apple-touch-icon" sizes="114x114" href="http://www.example.com/apple_touch_icon_iphone_retina.png" />
<link rel="apple-touch-icon" sizes="144x144" href="http://www.example.com/apple_touch_icon_ipad_retina.png" />
<?php
}
add_action( 'wp_head', 'pojo1029_show_favicon' );
@KingYes
KingYes / add-custom-widget-in-pojo-page-builder.php
Created Apr 18, 2014
Simple code for add custom Widget to Page Builder by Pojo
View add-custom-widget-in-pojo-page-builder.php
<?php
function add_social_widget_to_page_builder( $widgets ) {
$widgets[] = 'Pojo_Widget_Social_Links';
return $widgets;
}
add_filter( 'pb_page_builder_widgets', 'add_social_widget_to_page_builder' );
@KingYes
KingYes / wma-to-mp3.sh
Created Mar 11, 2014
WMA to MP3 Coverctor.
View wma-to-mp3.sh
#!/bin/bash
current_directory=$( pwd )
#remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done
#Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader "$i" && lame --vbr-new -V4 -m s audiodump.wav -o "$i"; done
@KingYes
KingYes / lame-vbr-id3tags.py
Created Nov 26, 2013
Encode audio files (VBR Profile) and preserve id3 tags used with `lame` program.
View lame-vbr-id3tags.py
#!/bin/python
# -*- coding: utf-8 -*-
"""
Encode audio files (VBR Profile) and preserve id3 tags
used with `lame` program.
@Author: Yakir Sitbon <http://www.yakirs.net/>
@Version: 1.0
"""
import os
@KingYes
KingYes / omer-count.php
Created Apr 9, 2013
Very PHP Simple method for counting of the Omer.
View omer-count.php
<?php
/**
* Very Simple method for Omer count.
*
* @return bool|int Omer count or false if out Omer range date.
*
* @author Yakir Sitbon (http://www.yakirs.net/)
*/
function yakir_get_omer_count() {
// Get now jd date.