Skip to content

Instantly share code, notes, and snippets.

View groman-me's full-sized avatar

Roman Gusev groman-me

View GitHub Profile
This file has been truncated, but you can view the full file.
[{"link": "https://www.amazon.jobs/en/jobs/999863/technical-program-manager-doit-team", "job_title": "Technical Program Manager DOIT Team", "locations": "Edinburgh, Scotland, GBR", "company_or_team_name": "Amazon Dev Centre(Scotland)Ltd", "summary": "\u00b7 Masters Degree preferred. \n\u00b7 Experience with various industry analytics and monitoring platforms. \n\u00b7 Machine learning experience. \n \n \n \nAmazon is an equal opportunities employer. We believe passionately that employing a diverse workforce is central to our success. We make recruiting decisions based on your experience and skills. We value your passion to discover, invent, simplify, and build.", "publish_date": "2019-11-25", "job_id": null}, {"link": "https://www.amazon.jobs/en/jobs/999755/snr-technical-program-manager", "job_title": "Snr. Technical Program Manager", "locations": "Gurugram, Haryana, IND", "company_or_team_name": "ADCI - Haryana", "summary": "\u00b7 Master\u2019s degree in Computer Science, Computer Engineering or relat
@groman-me
groman-me / save_restore_dependencies.sql
Created March 19, 2020 17:44 — forked from mateuszwenus/save_restore_dependencies.sql
PostgreSQL: How to handle table and view dependencies
create table deps_saved_ddl
(
deps_id serial primary key,
deps_view_schema varchar(255),
deps_view_name varchar(255),
deps_ddl_to_run text
);
create or replace function deps_save_and_drop_dependencies(p_view_schema varchar, p_view_name varchar) returns void as
$$
@groman-me
groman-me / postgres_queries_and_commands.sql
Created January 15, 2020 14:44 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@groman-me
groman-me / base.rb
Created October 22, 2015 13:43 — forked from fxposter/base.rb
Default Rails template
# rails new app_name -d mysql --skip-bundle -m path/to/this/template.rb
comment_lines 'Gemfile', "gem 'turbolinks'"
comment_lines 'Gemfile', "gem 'jbuilder'"
comment_lines 'Gemfile', "gem 'sass-rails'"
comment_lines 'Gemfile', "gem 'coffee-rails'"
comment_lines 'Gemfile', "gem 'uglifier'"
comment_lines 'Gemfile', "gem 'sdoc'"
gsub_file 'Gemfile', "gem 'mysql2'", "gem 'mysql2', '~> 0.3.20'"
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'sqlite3'
GEMFILE
system 'bundle'
<html>
<head>
<title>Line graph over time with multiple data points using SVG and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
body {
font-family: "Helvetica Neue", Helvetica;
}
/* tell the SVG path to be a thin blue line without any area fill */
@groman-me
groman-me / enable_optimizer
Created April 28, 2014 16:07
Enable optimizer trace in MySQL
mysql> SET optimizer_trace="enabled=on";
mysql> SELECT ....;
mysql> SELECT * FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE;
@groman-me
groman-me / parse.regexp
Created October 22, 2013 16:46
ruby regexp to parse line of nginx conf
(\d+.\d+.\d+.\d+)\s-\s-\s\[(.+)\]\s"GET\s(.+)\s\w+\/.+"\s\d+\s\d+\s"(.+)"\s"(.+)"

ruby-1.9.3-p327 cumulative performance patch for rbenv

This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.

Requirements

You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.

@groman-me
groman-me / cmd.sh
Created November 24, 2012 11:02
Shared folder for guest Ubuntu on Mac host
sudo mount -t vboxsf -o uid=1000,gid=1000 share_name destination_folder