Skip to content

Instantly share code, notes, and snippets.

Evgeniy OZ e-oz

Block or report user

Report or block e-oz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View q.sql
SELECT, if( is null,0,1) is_t1, if( is null,0,1) is_t2,
th.email_from_name as channel,
lg.primary_location_id, as group_id,
-- t1 - sent emails
t1.facility_name as t1_facility_name,
t1.fname as t1_fname, t1.lname as t1_lname,
CONCAT_WS(', ', NULLIF(trim(t1.address),''), NULLIF(trim(t1.address2),'')) as t1_address,
CONCAT_WS(', ', NULLIF(trim(,''), NULLIF(trim(t1.state),''), NULLIF(trim(,'')) as t1_city_state_zip,
CONCAT_WS(' ', cm.fname, cm.lname) as cm_name,
-- t2 - sent letters
View users.sql
SELECT distinct(
FROM user u
LEFT JOIN (select distinct(lower(email)) as email from email_campaign WHERE campaign_data_id = 14 AND
sent_date IS NOT NULL AND is_sent_successfully = 1 AND is_unsubscribed = 0) ec ON =
LEFT JOIN tmp_anndsc_letter1 t1 ON =
LEFT JOIN tmp_anndsc_letter2 t2 ON =
AND NOT IN (select user_id from file where type_id = 12 and internal_kind_id = 3)
View adobe.html
<!DOCTYPE html><html lang="en" class="wf-adobeclean-n4-active wf-adobeclean-n7-active wf-adobeclean-i4-active wf-adobeclean-i7-active wf-adobeclean-n3-active wf-sourcecodepro-n7-active wf-sourcecodepro-n4-active wf-active"><head class="at-element-marker" style="visibility:visible;"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="keywords" content="a, and, cancel, cancel_order, do, easy"><title>how to cancel monthly subscription to photoshop... |Adobe Community</title><meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="" type="text/css" media="all"><link rel="stylesheet" href="" type="text/css" media="all"><link rel="stylesheet" href="" type="text/css" media="all"><link rel="stylesheet" type="text/css" href="
e-oz /
Created Dec 25, 2016
Rust installation old way - sudo curl -sSf | sh -s -- --channel=beta
# Copyright 2015 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
#> or the MIT license
# <LICENSE-MIT or>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.
View .gitignore_global
# Compiled source #
# Packages #
View Deploying a Rust App to Google App Engine.mhtml
From: <Saved by Blink>
Subject: Deploying a Rust App to Google App Engine
Date: Sun, 2 Apr 2016 14:43:06 -0000
MIME-Version: 1.0
Content-Type: multipart/related;
Content-Type: text/html
e-oz /
Last active Jul 11, 2016 — forked from isaacs/
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bash_profile
. ~/.bash_profile
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
e-oz /
Created Jan 31, 2016
Rust code deployment
cargo build --release
sudo killall my_server $RESULT &> /dev/null || true
nohup target/release/my_server > nohup.out 2>&1 &
e-oz / nginx.conf
Created Jan 30, 2016
nginx proxy for Rust web server
View nginx.conf
server {
listen 80;
server_name api.server.domain;
keepalive_timeout 65;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:3000;
proxy_temp_path /home/ec2-user/proxy_tmp;
View redis.init.d
# redis - this script starts and stops the redis-server daemon
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/6379.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/
You can’t perform that action at this time.