Skip to content

Instantly share code, notes, and snippets.

View ihorvorotnov's full-sized avatar
🇺🇦
Working remotely since 1999

Ihor Vorotnov ihorvorotnov

🇺🇦
Working remotely since 1999
View GitHub Profile
@hofmannsven
hofmannsven / README.md
Last active December 20, 2023 09:46
Notes on working with JetBrains PhpStorm IDE on macOS.
@SGudbrandsson
SGudbrandsson / index.php
Last active September 5, 2024 01:54
Create a WordPress staging area from your live wordpress setup with a Click-of-a-button [TM] ..
<?php
/**
*
* This script will copy your wordpress from public_html (or wherever)
* and place it in a staging folder.
* It will then clone the database, reconfigure the config file
* and replace URL's from the original URL to your staging URL.
* It will then make sure to NOT allow search engines to index the page.
*
* Use this script to clone your main wp in order to test maintenance work
@mvaneijgen
mvaneijgen / material-theme.terminal
Created June 15, 2015 20:27
material-theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGKSpYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKcHCBMXGyImVSRudWxs1QkKCwwNDg8QERJcTlNDb21wb25lbnRzVU5TUkdCXE5T
Q29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29sb3JTcGFjZVYkY2xhc3NPECgwLjAyNzQ1MTAw
NjcgMC4yMTE3NjQ3MjMxIDAuMjU4ODIzNDg0MiAxTxAoMC4wMzkzODA3NDc4MiAwLjE2
@v0lkan
v0lkan / nginx.conf
Last active April 15, 2025 11:53
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@kzima
kzima / README.md
Last active August 29, 2015 14:21 — forked from hofmannsven/README.md
Mysql command cheatsheet
anonymous
anonymous / my.css
Created May 24, 2015 23:38
CSS Gradient Animation
background: linear-gradient(334deg, #36967d, #36967d);
background-size: 400% 400%;
-webkit-animation: AnimationName 22s ease infinite;
-moz-animation: AnimationName 22s ease infinite;
-o-animation: AnimationName 22s ease infinite;
animation: AnimationName 22s ease infinite;
@-webkit-keyframes AnimationName {
    0%{background-position:58% 0%}
    50%{background-position:43% 100%}
    100%{background-position:58% 0%}
@jessicamarcus
jessicamarcus / getVals.js
Created May 24, 2015 23:38
print all key/vals of an object to the console
var obj = object;
for (key in obj) {
console.log('val [' + key + ']\n\n ' + obj[key] + '\n\n');
}
// if we only wanted the names of each key:
console.log(Object.keys(obj));
anonymous
anonymous / Pure CSS Slide Down Toggle.markdown
Created May 24, 2015 23:37
Pure CSS Slide Down Toggle
@stefanschmidt
stefanschmidt / remove-watermark.sh
Last active May 4, 2021 10:57
Remove watermark from an image
# depends on ImageMagick (available via Homebrew)
# remove by color level (light watermarks)
mogrify -level '0%,75%,0.25' page.png
# remove by area (bottom of page)
mogrify -extent 3000x4000 -gravity North -fill white page.png
@ihorvorotnov
ihorvorotnov / script.js
Last active August 28, 2022 11:08
Using wp_is_mobile() in WordPress to detect mobile users (phones and tablets)
jQuery( document ).ready( function($) {
if ( $( "body" ).hasClass("wp-is-mobile"){
/* Do javascript for mobile */
}
else{
/* Do javascript for non-mobile */
}
});