Skip to content

Instantly share code, notes, and snippets.

View rku4er's full-sized avatar
🌍
Working from home

Roman K rku4er

🌍
Working from home
  • Ukraine
View GitHub Profile
@matthewbdaly
matthewbdaly / init.vim
Last active January 31, 2024 16:34
My NeoVim config
let g:polyglot_disabled = ['markdown']
call plug#begin()
" Project
Plug 'ahmedkhalf/project.nvim'
" Search
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
@mortennajbjerg
mortennajbjerg / Install WP CLI on Hetzner Managed Server
Created June 11, 2018 13:15
Install WP CLI on Hetzner Managed Server
mkdir ~/bin
mkdir ~/bin/wp-cli
cd ~/bin/wp-cli
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
echo "export COLUMNS" >> ~/.bashrc
echo "alias wp='php ~/bin/wp-cli/wp-cli.phar'" >> ~/.bashrc
echo "alias php='/usr/bin/php'" >> ~/.bashrc
source ~/.bashrc
echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc
@HoldOffHunger
HoldOffHunger / bradvin.social.share.urls.txt
Last active October 19, 2024 18:33
Social Share URL's (Summary)
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@Xilonz
Xilonz / setup.php
Created February 27, 2018 10:50
Sage Wordpress Query Loop for Blade templates
/**
* Add this to your setup.php
* Usage @loop( $wp_query ) or $loop and end with @endloop
* the new $loop variable is available
*/
/**
* Create @loop Blade directive
*/
sage('blade')->compiler()->directive('loop', function ( $query = null ) {
#may need to update local branches fist
git remote update origin --prune
# get all branches that are merged into release
# remove the origin/ prefix
# make sure we don't delete release, develop and HEAD branches
# remove them
git branch -r --merged origin/release | sed 's/origin\///' | grep -vwE "(develop|HEAD|release)$" | xargs -n 1 git push origin --delete
#for develop
@obiPlabon
obiPlabon / vc-js-events.js
Last active October 5, 2019 12:46
List of some Visual Composer JS events
// Fixed named events
var _events = [
"vc:access:initialize",
"vc:access:backend:ready",
"shortcodes:vc_row:add:param:name:parallax",
"shortcodes:vc_row:update:param:name:parallax",
"shortcodes:vc_single_image:sync",
"shortcodes:vc_single_image:add",
"shortcodes:add:param:type:el_id",
"click:media_editor:add_image",
@adamjstewart
adamjstewart / bash-paths.sh
Created October 2, 2016 17:15
Bash relative vs. absolute paths
#!/usr/bin/env bash
# There are many ways to get a path to a file or script.
# This script showcases several of them and their pitfalls.
# Credit for most of these techniques comes from:
# http://stackoverflow.com/questions/4774054/
abs_path='/usr/bin/bash'
rel_path='.'
@jsonberry
jsonberry / onload.js
Last active July 3, 2023 14:10
Window vs. Document Loading Events
/**
Taken from: http://stackoverflow.com/questions/588040/window-onload-vs-document-onload
According to Parsing HTML documents - The end,
The browser parses the HTML source and runs deferred scripts.
A DOMContentLoaded is dispatched at the document when all the HTML has been parsed and have run. The event bubbles to the window.
The browser loads resources (like images) that delay the load event.
A load event is dispatched at the window.
Therefore, the order of execution will be
DOMContentLoaded event listeners of window in the capture phase
DOMContentLoaded event listeners of document
@ashokmhrj
ashokmhrj / custom-template-plugin.php
Last active October 21, 2023 13:36
Get Template Part From plugin directory
<?php
/**
* The below function will help to load template file from plugin directory of wordpress
* Extracted from : http://wordpress.stackexchange.com/questions/94343/get-template-part-from-plugin
*/
define('PLUGIN_DIR_PATH','Your-plugin-directory-path');
function ccm_get_template_part($slug, $name = null) {
do_action("ccm_get_template_part_{$slug}", $slug, $name);
@milanaryal
milanaryal / schema-org-structured-data-markup-using-microdata.html
Last active October 8, 2024 15:22
An example of how to mark up a HTML5 webpage using the schema.org schemas and microdata.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">