/root/mongo_bkp.sh
rm -rf /root/dump* && mongodump && tar -cvf dump.tar dump/
ssh user@machine /root/mongo_bkp.sh
/** | |
* Implementação do algorítimo SoundEx em Javascript. | |
* @author João Batista Neto | |
* | |
* SoundEX é um algorítimo fonético para indexação de nomes pelo som segundo | |
* sua pronúncia. O algorítimo foi desenvolvido por Robert C. Russell e | |
* Margaret K. Odell e patenteado em 1918 e 1922. | |
* {@link http://en.wikipedia.org/wiki/Soundex} | |
* | |
* @return {String} |
// When using angular-translate it's impossible to make two-way data binding translations yet, | |
// and this sometimes can be a headache. So I've developed this directive to save some time. | |
// The view goes like this: <TAG data-bind-translate="scopeObjToTranslate.item.text"></TAG>. | |
app.directive('bindTranslate', [ | |
'$translate', | |
'$parse', | |
function($translate, $parse) { |
<?php | |
/** | |
* Use * for origin | |
*/ | |
add_action( 'rest_api_init', function() { | |
remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' ); | |
add_filter( 'rest_pre_serve_request', function( $value ) { | |
header( 'Access-Control-Allow-Origin: *' ); | |
header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' ); |
var countries = ["Afghanistan", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua and Barbuda", "Argentina", "Armenia", "Aruba", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bermuda", "Bhutan", "Bolivia", "Bosnia and Herzegowina", "Botswana", "Bouvet Island", "Brazil", "British Indian Ocean Territory", "Brunei Darussalam", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Cayman Islands", "Central African Republic", "Chad", "Chile", "China", "Christmas Island", "Cocos (Keeling) Islands", "Colombia", "Comoros", "Congo", "Congo, the Democratic Republic of the", "Cook Islands", "Costa Rica", "Cote d'Ivoire", "Croatia (Hrvatska)", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Falkland Islands (Malvin |
/* | |
An open-source LM35DZ Temperature Sensor for Arduino. This project will be enhanced on a regular basis | |
(cc) by Daniel Spillere Andrade , http://www.danielandrade.net | |
http://creativecommons.org/license/cc-gpl | |
*/ | |
int pin = 0; // analog pin | |
int tempc = 0,tempf=0; // temperature variables | |
int samples[8]; // variables to make a better precision | |
int maxi = -100,mini = 100; // to start max/min temperature |
.woocommerce.single-product .product .summary .variations { | |
width: 100%; | |
} | |
.woocommerce.single-product .product .summary .variations td { | |
display: block; | |
width: 100%; | |
} | |
.woocommerce.single-product .product .summary .variations td label { | |
font-family: 'Nunito', Helvetica, Arial, sans-serif; | |
letter-spacing: 0px; |
//For a specified field | |
db.collectionname.createIndex( | |
{ "field_name": "text" }, | |
{ name: "TextIndex" } | |
) | |
//For All Fields | |
db.collectionname.createIndex( | |
{ "$**": "text" }, | |
{ name: "TextIndex" } |
<?php | |
add_filter( 'user_contactmethods', 'add_new_user_fields' ); | |
function add_new_user_fields( $user_contact ) { | |
$user_contact[ 'billing_cel_phone' ] = 'Celular'; | |
return $user_contact; | |
} |