Skip to content

Instantly share code, notes, and snippets.

View sukhikh18's full-sized avatar
💪
Business, Development, Sales, Marketing

Nick Sergeevich sukhikh18

💪
Business, Development, Sales, Marketing
View GitHub Profile
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@gregrickaby
gregrickaby / remove-woocommerce-styles-scripts.php
Last active April 25, 2024 09:45
Remove WooCommerce styles and scripts.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@diolektor
diolektor / defaults
Created October 19, 2012 17:29
Настройка хостов nginx для домашнего использования
# По мотивам http://habrahabr.ru/post/142648/
# Все проекты лежат по адресу: /home/projects/{имя.проекта}/public
server {
listen 80 default; # этот конфиг - умолчательный для 80 порта
server_name _; # хитрый ключик, обозначающий, что этот конфиг применим для любого сайта
set $sathost $host; # В sathost будет лежать имя сайта. Так же должна называться директрия с сайтом
root /home/projects/$sathost/public; # конень сайта определяем автоматически
// Mixin: Automaticamente escreve
// USO:
// +background-2x(logo)
// Com imagem jpg:
// +background-2x(logo,jpg)
// Obs: Obrigatório ter a imagem normal e retina no mesmo diretório - "imagem.png" e "imagem@2x.png"
// OUTPUT CSS:
// #logo {
@rxaviers
rxaviers / gist:7360908
Last active June 15, 2024 20:43
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@codedokode
codedokode / !Как установить сфинкс.md
Last active May 3, 2024 08:50
Как установить и настроить сфинкс.

Как установить и настроить сфинкс.

Скачиваем сфинкс (берем версию с MySQL и со стеммингом на 15 языков Win32 binaries w/MySQL+PgSQL+libstemmer+id64 support соответствующую битности твоей ОС), распаковываем например в d:\temp\s\

На этом установка sphinx завершена. В дебиане просто делаем sudo apt-get install sphinxsearch.

Создаем таблицы:

CREATE TABLE news 

(id INT(10) AUTO_INCREMENT PRIMARY KEY, topic INT(10) NOT NULL, header VARCHAR(200) NOT NULL,

/**
* INSTALLATION: this code should be pasted into your theme's functions.php file.
*
* To Use: Install 'Easy Fancybox'. Leave the URL blank on an image slide in Meta Slider.
* The slide will automatically be linked to it's full image in a lightbox
*/
function metaslider_easy_fancybox($attributes, $slide, $slider_id) {
if (!strlen($attributes['href'])) {
$attributes['href'] = wp_get_attachment_url($slide['id']);
$attributes['class'] = 'fancybox';
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active June 11, 2024 14:17
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@growdev
growdev / gist:3e084f833a3f27bf54af
Created October 14, 2014 14:10
Getting WooCommerce Cart Subtotal
<?php
add_action('woocommerce_cart_updated', 'growdev_woocommerce_cart_updated', 90);
function growdev_woocommerce_cart_updated ( $cart ){
// output subtotal
error_log( "subtotal: " . WC()->cart->subtotal );
// output the
error_log( "get_cart_subtotal: " . WC()->cart->get_cart_subtotal() );
@mamchenkov
mamchenkov / monolog.php
Last active January 5, 2022 09:31
Example use of Monolog logger
<?php
// Before: composer require monolog/monolog
// composer autoloader
require_once 'vendor/autoload.php';
// Shortcuts for simpler usage
use \Monolog\Logger;
use \Monolog\Formatter\LineFormatter;
use \Monolog\Handler\StreamHandler;