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
[[{"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
@calvez
calvez / artist-sidebar-links.php
Last active May 25, 2017 09:55
strm.hu sidebar links

#source https://drupal.stackexchange.com/a/223785/56193

You can install drush to latest version or specified version. I prefer drush 7, you can make this, first uninstall the current version of drush of your server.

i use debian, then i install with

sudo apt-get install drush and you need remove

@calvez
calvez / fail2ban-allstatus.sh
Created April 16, 2017 15:28 — forked from kamermans/fail2ban-allstatus.sh
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@calvez
calvez / wp-query-ref.php
Created April 11, 2017 09:28 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
drush pml --no-core --type=module --status=enabled --pipe | xargs drush -y dis
@calvez
calvez / fix-drupal-permissions.sh
Last active April 6, 2017 08:55
Drupal - Bash shell script to fix Drupal permissions
#!/bin/bash
path=${1%/}
user=${2}
group="www-data"
help="nHelp: This script is used to fix permissions of a drupal installationnyou need to provide the following arguments:nt 1) Path to your drupal installationnt 2) Username of the user that you want to give files/directories ownershipnNote: "www-data" (apache default) is assumed as the group the server is belonging to, if this is different you need to modify it manually by editing this scriptnnUsage: (sudo) bash ${0##*/} drupal_path user_namen"
if [ -z "${path}" ] || [ ! -d "${path}/sites" ] || [ ! -f "${path}/modules/system/system.module" ]; then
echo "Please provide a valid drupal path"
echo -e $help
@calvez
calvez / mysql.sh
Last active April 5, 2017 15:19
Virtualhost script I dunno, but Mysql - # Bash script written by Saad Ismail - me@saadismail.net - thanks guys
#!/bin/bash
# Bash script written by Saad Ismail - me@saadismail.net
# If /root/.my.cnf exists then it won't ask for root password
if [ -f /root/.my.cnf ]; then
echo "Please enter the NAME of the new WordPress/Drupal database! (example: database1)"
read dbname
echo "Please enter the WordPress database CHARACTER SET! (example: utf8_general_ci, utf8, for hungarian wordpress you can use utf8_hungarian_ci...)"
read charset
echo "Creating new WordPress/Drupal database..."