Skip to content

Instantly share code, notes, and snippets.

@vyorkin
vyorkin / gist:3e8a29f702a4ec7b8988
Created December 29, 2014 23:12
cap3 maintenance mode
namespace :maintenance do
desc "Maintenance start (edit config/maintenance.yml to provide parameters)"
task :start do
on roles(:web) do
upload! "config/maintenance.yml", "#{current_path}/tmp/maintenance.yml"
end
end
desc "Maintenance stop"
task :stop do
@vyorkin
vyorkin / designer.html
Created December 30, 2014 22:04
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
#define говно NULL
#define нихуя void
#define факт bool
#define хуёво false
#define пиздато true
#define цифра int
#define число float
#define базар char
#define ТамГде *
#define типа {
@vyorkin
vyorkin / cVimrc
Last active November 12, 2016 21:15
cVimrc
set nosmoothscroll
set autofocus
let searchlimit = 10
let scrollstep = 50
let barposition = "top"
let mapleader = ","
map gb :buffer<Space>
map <Leader>r reloadTabUncached
@vyorkin
vyorkin / gist:711589d7f1a90954dec5
Created February 10, 2015 22:53
cVim white theme
#cVim-link-container, .cVim-link-hint, #cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results, .cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left, .cVim-completion-item .cVim-right, #cVim-hud, #cVim-status-bar {
font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial;
font-size: 10pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-link-container {
position: absolute;
pointer-events: none;
width: 100%; left: 0;
@vyorkin
vyorkin / gist:653c4e3dad9d44642732
Created April 20, 2015 11:29
my overcommit settings
❯ cat .overcommit.yml
# Use this file to configure the Overcommit hooks you wish to use. This will
# extend the default configuration defined in:
# https://github.com/brigade/overcommit/blob/master/config/default.yml
#
# At the topmost level of this YAML file is a key representing type of hook
# being run (e.g. pre-commit, commit-msg, etc.). Within each type you can
# customize each hook, such as whether to only run it on certain files (via
# `include`), whether to only display output if it fails (via `quiet`), etc.
#
@vyorkin
vyorkin / ReactRouterContext.js
Created June 5, 2015 08:35
react router testing
import React, { PropTypes } from 'react';
export default function(Component, props, stubs) {
function RouterStub() {}
Object.assign(RouterStub, {
makePath() {},
makeHref() {},
transitionTo() {},
replaceWith() {},
module Routes (handleRequest) where
-- ...
share [mkPersist sqlSettings]
$(persistFileWith lowerCaseSettings "config/models")
-- ^
-- ...
@vyorkin
vyorkin / case
Last active August 29, 2015 14:24
question
❯ http -j POST localhost:8080/api/v1/sign-up phone=+79057220657 country=1 city=2 os=blah
HTTP/1.1 500 Internal Server Error
Access-Control-Allow-Headers: Accept, Content-Type
Access-Control-Allow-Methods: GET, HEAD, POST, PUT, DELETE, PATH, OPTIONS
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8
Date: Wed, 01 Jul 2015 15:32:56 GMT
Server: Warp/3.0.13.1
Transfer-Encoding: chunked
import webpack from 'webpack';
gulp.task('bundle', () => {
const bundler = webpack(webpackConfig);
function bundle(err, stats) {
if (err) {
throw new $.util.PluginError('webpack', err);
}