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 | |
set_time_limit(0); | |
$url = 'http://www.freewarelovers.com/android/download/temp/1306495040_Number_Blink_1.1.1.apk'; | |
$file = fopen(dirname(__FILE__) . '/downloads/a.apk', 'w+'); | |
$curl = curl_init(); | |
// Update as of PHP 5.4 array() can be written [] | |
curl_setopt_array($curl, [ |
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
# Delete missing files | |
svn status | ? { $_ -match '^!\s+(.*)' } | % { svn rm $Matches[1] } | |
# Added new files | |
svn status | ? { $_ -match '^\?\s+(.*)' } | % { svn add $Matches[1] } | |
# Commit repository | |
svn commit -m "This commit is done by a PowerShell bat" |
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
$html-base-font-size = 12px; | |
@function rem( $px ){ | |
@if( unit( $px ) == 'rem' ){ | |
@return $px; | |
} | |
@else if( unit($px) == 'px' ) { | |
@return ( $px / $html-base-font-size ) + 0rem; | |
} | |
@else if( unit( $px ) == '' ) { |
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
/** | |
* Time ago - Human time diff enhanced | |
* | |
* @param string $timeformat Fallback date format | |
* @param int $timestamp Post or comment or anyhing's timestamp | |
* @return string | |
*/ | |
if( ! function_exists('dw_time_ago') ){ | |
function dw_time_ago( $timeformat = 'j F Y H:i', $timestamp = '' ){ | |
if( ! $timestamp ){ |
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
/** | |
* Is woocommerce page | |
* | |
* @param string $page ( 'cart' | 'checkout' | 'account' | 'endpoint' ) | |
* @param string $endpoint If $page == 'endpoint' and you want to check for specific endpoint | |
* @return boolean | |
*/ | |
if( ! function_exists('is_woocommerce_page') ){ | |
function is_woocommerce_page( $page = '', $endpoint = '' ){ | |
if( ! $page ){ |