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
############################################################################### | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
# GNU General Public License for more details. |
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
.controller('DashCtrl', function($scope, $ionicPlatform, $cordovaGeolocation) { | |
var watch; | |
var watchOptions = { | |
timeout : 5000, | |
maximumAge: 3000, | |
enableHighAccuracy: true // may cause errors if true | |
}; | |
var pollCurrentLocation = function() { | |
$cordovaGeolocation.getCurrentPosition(watchOptions) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Auto play html audio in iOS WeChat InAppBrowser the right way</title> | |
</head> | |
<body> | |
<h1>在 iOS 微信浏览器中自动播放 HTML5 audio(音乐) 的正确方式</h1> | |
<p>核心原理: 在微信的JS-API 中 play 一下 audio 即可达到自动播放的目的(应该是微信自己做了处理)</p> |
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
#Insall Ajenti | |
apt-get update | |
wget http://repo.ajenti.org/debian/key -O- | apt-key add - | |
echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list | |
apt-get update | |
apt-get install ajenti | |
service ajenti restart | |
# Uninstall Apache2 | |
sudo apt-get autoremove && sudo apt-get remove apache2* |
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
Run this command to install MG-CLI: | |
sudo apt-get update && wget https://minergate.com/download/deb-cli -O minergate-cli.deb && sudo dpkg -i minergate-cli.deb | |
to start miner (4 cores for BCN) use this command: | |
minergate-cli -user <[email protected]> -bcn 4 | |
Feel free to send some of your earnings to me: | |
ETH (Don't attempt to send other coins to this address!): 0xc168b2be05baa698a0f9b6d5590e26a800232adb |
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 | |
// hide coupon field on cart page | |
function hide_coupon_field_on_cart( $enabled ) { | |
if ( is_cart() ) { | |
$enabled = false; | |
} | |
return $enabled; |
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
/*-----------------------------------------------------------------------------------*/ | |
/* WooCommerce - Change Checkout Notes Label and Place Holder Text | |
/*-----------------------------------------------------------------------------------*/ | |
// Hook in | |
add_filter( 'woocommerce_checkout_fields' , 'theme_override_checkout_notes_fields' ); | |
// Our hooked in function - $fields is passed via the filter! | |
function theme_override_checkout_notes_fields( $fields ) { | |
$fields['order']['order_comments']['placeholder'] = 'Add some order notes or a gift message here.'; |
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: Admin Filter BY Custom Fields | |
Plugin URI: http://en.bainternet.info | |
Description: Filter posts or pages in admin by custom fields (post meta) | |
Version: 1.0 | |
Author: Bainternet | |
Author URI: http://en.bainternet.info | |
*/ |
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: Admin Filter BY Custom Fields | |
Plugin URI: http://en.bainternet.info | |
Description: Filter posts or pages in admin by custom fields (post meta) | |
Version: 1.0 | |
Author: Bainternet | |
Author URI: http://en.bainternet.info | |
*/ |
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 | |
/** | |
* Filename: php-receive.php | |
* Purpose: Receive messages from RabbitMQ server using AMQP extension | |
* Exchange Name: exchange1 | |
* Exchange Type: fanout | |
* Queue Name: queue1 | |
*/ | |
$connection = new AMQPConnection(); | |
$connection->setLogin("admin"); |
OlderNewer