Skip to content

Instantly share code, notes, and snippets.

View antonkorotkov's full-sized avatar
🖕
f..ck putin

Anton antonkorotkov

🖕
f..ck putin
View GitHub Profile
@antonkorotkov
antonkorotkov / gist:9b41d70cb41242a4c81b
Last active November 30, 2015 09:53
expiration.sql
select distinct(`wp_posts`.`ID`),`wp_posts`.`post_title`, `wp_users`.`user_email`, `wp_users`.`display_name`, `wp_woocommerce_downloadable_product_permissions`.`access_expires` from `wp_woocommerce_downloadable_product_permissions`,`wp_users`,`wp_posts` where `access_expires` = DATE_SUB(CURDATE(), INTERVAL -205 DAY) and `wp_woocommerce_downloadable_product_permissions`.`user_id` = `wp_users`.`ID` and `wp_posts`.`ID` = `wp_woocommerce_downloadable_product_permissions`.`product_id`;
The gsutil rsync command makes the contents under dst_url the same as the contents under src_url, by copying any missing files/objects, and (if the -d option is specified) deleting any extra files/objects. For example, to make gs://mybucket/data match the contents of the local directory “data” you could do:
gsutil rsync -d data gs://mybucket/data
To recurse into directories use the -r option:
gsutil rsync -d -r data gs://mybucket/data
To copy only new/changed files without deleting extra files from gs://mybucket/data leave off the -d option:
@antonkorotkov
antonkorotkov / gist:e0b7f334711bc3638ced
Created April 23, 2015 15:58
LATEST DOCKER RUNNER
<?php
include_once( __DIR__ . '/vendor/autoload.php');
/**
* Get configs
*/
$configs = json_decode(file_get_contents('https://gist.githubusercontent.com/antonkorotkov/7b7bd50ff3d9ce42c48b/raw/41936ed1462aad4e5f72816ee76d86896fb0c787/gistfile1.json'));
/**
[
{
"name": "www-wpcloud-io",
"domain": "www.wpcloud.io",
"host": "www",
"git": "git@github.com:wpCloud/www.wpcloud.io",
"servers": [
{
"host": "mosul.wpcloud.io",
"path": "/opt/sources/wpCloud/www.wpcloud.io",
@antonkorotkov
antonkorotkov / db_type_convert
Created March 25, 2015 14:37
Convert DB type
#!/bin/bash
# MySQL info
DB_USER='root'
DB_PSWD=''
DB_HOST='localhost'
# Backup path, no trailing slash!
BACKUP_PATH='.'
<form style="display:none;" data-scope="events" data-bind="elasticFilter:{index:'search/v2',middle_timepoint:{gte:'now-1d',lte:'now-1d'},per_page:25,period_field:'start_date',sort_by:'start_date',type:'event',location_field:'venue.address.geo',return_fields:['start_date','description','summary','venue.address.city','venue.address.state','url','image.poster','venue.name','venue.url','artists.name','artists.url','tickets']}" class="elastic_form">
</form>
@antonkorotkov
antonkorotkov / gist:577a487318ff85bc309a
Last active August 29, 2015 14:16
FTN Support Groups
[vc_row row_style="full-width" bg_type="no_bg" bg_grad="background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #E3E3E3));background: -moz-linear-gradient(top,#E3E3E3 0%);background: -webkit-linear-gradient(top,#E3E3E3 0%);background: -o-linear-gradient(top,#E3E3E3 0%);background: -ms-linear-gradient(top,#E3E3E3 0%);background: linear-gradient(top,#E3E3E3 0%);" parallax_style="vcpb-default" bg_image_repeat="repeat" bg_image_size="cover" bg_img_attach="scroll" parallax_sense="30" animation_direction="left-animation" animation_repeat="repeat" bg_override="0" parallax_content_sense="30" fadeout_start_effect="30" overlay_pattern_opacity="80" multi_color_overlay_opacity="0.6" seperator_type="none_seperator" seperator_position="top_seperator" seperator_shape_size="40" seperator_svg_height="60" seperator_shape_background="#ffffff" seperator_shape_border="none" seperator_shape_border_width="1" icon_type="no_icon" icon_size="32" icon_style="none" icon_color_border="#333333" icon_border_size="1" icon
[vc_row row_style="full-width" bg_type="no_bg" bg_grad="background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #E3E3E3));background: -moz-linear-gradient(top,#E3E3E3 0%);background: -webkit-linear-gradient(top,#E3E3E3 0%);background: -o-linear-gradient(top,#E3E3E3 0%);background: -ms-linear-gradient(top,#E3E3E3 0%);background: linear-gradient(top,#E3E3E3 0%);" parallax_style="vcpb-default" bg_image_repeat="repeat" bg_image_size="cover" bg_img_attach="scroll" parallax_sense="30" animation_direction="left-animation" animation_repeat="repeat" bg_override="0" parallax_content_sense="30" fadeout_start_effect="30" overlay_pattern_opacity="80" multi_color_overlay_opacity="0.6" seperator_type="none_seperator" seperator_position="top_seperator" seperator_shape_size="40" seperator_svg_height="60" seperator_shape_background="#ffffff" seperator_shape_border="none" seperator_shape_border_width="1" icon_type="no_icon" icon_size="32" icon_style="none" icon_color_border="#333333" icon_border_size="1" icon
git subtree pull --prefix=wp-content/themes/wp-kiwi git@github.com:UsabilityDynamics/wp-kiwi.git develop --squash
@antonkorotkov
antonkorotkov / event-schema.yaml
Last active August 29, 2015 14:08
Event Schema
#Event Data Schema
---
name: {
field: post_title,
desc: The name of the Event item
}
url: {
field: permalink,
desc: URL of the Event item