Skip to content

Instantly share code, notes, and snippets.

View calvez's full-sized avatar
🏠
Working from home

calvez calvez

🏠
Working from home
  • Budapest, Hungary
View GitHub Profile
@calvez
calvez / wpup.sh
Created January 30, 2018 21:31
/usr/local/bin/wpup
#!/bin/bash
timestamp1=$(date "+%Y%m%d-%H%M%S")
RED=`tput setaf 1`
GREEN=`tput setaf 2`
NC=`tput sgr0`
echo "Database backup"
wp db export
echo -e "${RED}Update Wordpress core...${NC}\n"
$('.valuefield').each(function() {
var elem = $(this);
// Save current value of element
elem.data('oldVal', elem.val());
// Look for changes in the value
elem.bind("propertychange change click keyup input paste", function(event){
// If value has changed...
@calvez
calvez / asztronauta.css
Created November 28, 2017 09:48
asztronauta css módosításai
/*
Itt adhatunk meg saját CSS kódot.
Kattintsunk a fenti segítség ikonra a további információkhoz.
*/
.widget_shopping_cart .total, .shop_table.woocommerce-checkout-review-order-table .cart-subtotal th, .shop_table.woocommerce-checkout-review-order-table .cart-subtotal td, .cart_totals table .cart-subtotal th, .cart_totals table .order-total th, .shop_table thead th, .cmsmasters_single_product .product_meta a, .cmsmasters_product .cmsmasters_product_title a, .cmsmasters_product_cat a, .woocommerce-info, .woocommerce-message, .woocommerce-error li, #page .remove, .cmsmasters_woo_wrap_result .woocommerce-result-count, .cmsmasters_product .cmsmasters_product_cat, .shop_attributes th, .shop_table .product-name a, ul.order_details strong, .widget_layered_nav ul li, .widget_layered_nav ul li a, .widget_layered_nav_filters ul li, .widget_layered_nav_filters ul li a, .widget_product_categories ul li, .widget_product_categories ul li a, .widget > .product_list_widget a, .widget > .product_list_widget .amount, .widge
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName asztronauta.com
ServerAlias www.asztronauta.com
DocumentRoot /home/websites/web/asztronauta.com
<Directory />
AllowOverride All
</Directory>
<Directory /home/websites/web/asztronauta.com>
@calvez
calvez / drupal-theme-hooks.php
Last active November 22, 2017 14:40
drupal theme hooks for bdo
// img snippet
<img src="<?php print file_create_url($node->field_image[LANGUAGE_NONE][0]['uri']); ?>" />
<div class="container-fluid" style="background-image:url('<?php echo file_create_url($node->field_image[LANGUAGE_NONE][0]['uri']);?>');">
// img a coverhez váltoizóval style-t kérve
<?php
$image_uri = $node->field_image[LANGUAGE_NONE][0]['uri']; // or any public://my_image
@calvez
calvez / wp-secure-admin.md
Created November 16, 2017 13:06
átírja a wp default wp admin urljét

Steps:

  1. Add constant to wp-confing.php

define('WP_ADMIN_DIR', 'secret-folder'); define( 'ADMIN_COOKIE_PATH', SITECOOKIEPATH . WP_ADMIN_DIR); 2. Add below filter to functions.php

add_filter('site_url', 'wpadmin_filter', 10, 3); function wpadmin_filter( $url, $path, $orig_scheme ) {

@calvez
calvez / zenbot-test.md
Last active October 1, 2017 15:11
zenbot trader settings

paper trader ./zenbot.sh trade --paper bittrex.BTC-USDT --period=10m --strategy=rsi --trend_ema=15 --profit_stop_enable_pct=10

live trader on bittrex, 2017-10-01 ./zenbot.sh trade bittrex.QTUM-BTC --period=3m --strategy=rsi --trend_ema=15 --profit_stop_enable_pct=10 // results

[[{"instr":"4IG","category":"R\u00e9szv\u00e9nyek Standard","last":"2295","bid":"2206","ask":"2295","bidmax":"2206","askmin":"2295","lastbid":"2206","lastask":"2295","close":"2295","close2":"2295","open":"2295","min":"2295","max":"2295","dt_able":"1","bseid":"3564","status":"1","type":"instr","stamp":"2017-09-27 00:00:00","laststamp":"2017-09-28 09:11:07","ttsid":null,"orderid":null,"userid":"8097","otype":null,"limit":null,"stop":null,"execprice":null,"trans":null,"qty":"5","fee":null,"validuntil":null,"expire":null,"portfolioid":"35459","price":"2306.00","dt_qty":"0","profit":"-55.00","changept":"0","changepct":"0.00","pozicio":"11475"},{"instr":"ALTEO","category":"R\u00e9szv\u00e9nyek Standard","last":"4850","bid":"4750","ask":"4875","bidmax":"4750","askmin":"4875","lastbid":"4750","lastask":"4875","close":"4850","close2":"4850","open":"4770","min":"4710","max":"4850","dt_able":"1","bseid":"6494","status":"1","type":"instr","stamp":"2017-09-27 00:00:00","laststamp":"2017-09-27 00:00:00","ttsid":null,"order
@calvez
calvez / README.md
Created August 3, 2017 14:22 — forked from joyrexus/README.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output

@calvez
calvez / essential-wp-plugins.sh
Last active January 29, 2019 13:14
essential-wp-plugins
wp plugin install disable-comments maintenance wordpress-seo wordpress-importer developer fakerpress theme-test-drive theme-check log-viewer