Skip to content

Instantly share code, notes, and snippets.

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

ivan marchenko ivanmrchk

🏠
Working from home
View GitHub Profile
<?php
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
}
if (isset($_POST['imagePpUrl'])) {
//for testing
$imageRemoveBackgroundUrl = 'https://new.realty-cards.com/wp-content/themes/porto-child/api/remove.bg/downloads/no-bg.png';
json_encode(array('success' => true, 'image' => $imageRemoveBackgroundUrl));
@ivanmrchk
ivanmrchk / functions_child.php
Last active August 17, 2020 17:34
scm functions from child and parent theme
<?php
add_action( 'wp_enqueue_scripts', 'argu_child_scripts' );
/**
* Enqueue scripts and styles.
*/
function argu_child_scripts() {
wp_enqueue_script( 'argu-child', get_stylesheet_directory_uri() . '/js/referral.js', array( 'jquery' ), false, true );
}
date_default_timezone_set('America/Los_Angeles');
// get cookie ref
<?php
load_theme_textdomain('argu', get_template_directory() . '/lang');
require_once get_template_directory() . '/arguoptions/argu-config.php';
require_once get_template_directory() . '/inc/up-utils.php';
require_once get_template_directory() . '/inc/up-init.php';
require_once get_template_directory() . '/inc/up-sidebar.php';
require_once get_template_directory() . '/inc/config.php';
require_once get_template_directory() . '/inc/up-cleanup.php';
require_once get_template_directory() . '/inc/comments.php';
require_once get_template_directory() . '/inc/up-widgets.php';
@ivanmrchk
ivanmrchk / dos.go
Created September 23, 2019 14:54
Penetration testing with golang (dos attack)
package main
import (
"fmt"
"net/http"
)
func Dos(Target string) {
var Count int = 0
@ivanmrchk
ivanmrchk / add-place.go
Created September 23, 2019 14:51
Delete and add places from google map with Golang
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
)
@ivanmrchk
ivanmrchk / main.go
Created September 20, 2019 11:37
Count "Go" occurrences
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strings"
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"strings"
@ivanmrchk
ivanmrchk / gist:9d4916e820a60af2ef24fc6d5cbb9061
Created June 27, 2018 19:19
Xampp with mariadb on Arch Linux
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*
* @package PhpMyAdmin
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
@ivanmrchk
ivanmrchk / gulpfile.js
Created July 6, 2017 15:27
General every day use gulp file
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var sass = require('gulp-ruby-sass');
var livereload = require('gulp-livereload');
var imagemin = require('gulp-imagemin');
var prefix = require('gulp-autoprefixer');
function errorLog(error) {
console.error.bind(error);
this.emit('end');