Skip to content

Instantly share code, notes, and snippets.


Andrew Revinsky andrevinsky

View GitHub Profile
andrevinsky / batch-delete-gmail-emails.js
Created Mar 5, 2021 — forked from gene1wood/batch-delete-gmail-emails.js
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
View batch-delete-gmail-emails.js
This script, when used with Google Apps Scripts will delete 500 emails and
can be triggered to run every minute without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Configure the search query in the code below to match the type of emails
you want to delete
Browser to
Start a script and paste in the code below.
After you past it in, save it and click the little clock looking button.
View range.js
const range = function* (
step = from > to ? -1 : 1
) {
if (
step < 0
? from <= to
: from >= to
) {
andrevinsky / index.js
Created Nov 15, 2016 — forked from wtfil/index.js
injection of redux's dispatch in react-router's onEnter hook
View index.js
* common react, redux staff here
import {Router, createRoutes} from 'react-router';
import createBrowserHistory from 'history/lib/createBrowserHistory';
import rawRoutes from './routes';
import store from './store';
function mixStoreToRoutes(routes) {
return routes && => ({
View memo.txt
Как вы привязываете логику приложения к срабатыванию какого-то действия (action, FSA)?
Вот, к примеру, приложение получило от сервера пакет элементов. Понятно, что есть редьюсер,
который эти элементы сложит куда-то; может, даже взведёт какой-то флаг, что, мол, данные
получены. И какой-то компонент даже отрисует их.
Но вот живет в приложении какая-то другая сущность, которая, должна сделать какую-то трансформацию
над элементами и принять решение, надо ли еще совершать какие-то действия (подгрузить новую порцию,
обновить флаги в профиле пользователя и тп).
View ackProducer.sample.js
const KEYS = {
key: 'k',
invoked: 'i',
fulfilled: 'f',
depsOn: 'd',
notify: 'n'
function ackProducer(handle, { hashMap = {}, lastKey = null } = {}, diag) {
const state = { hashMap, lastKey };
View gist:8e9994c138afe51015a7c9721b845af3
Exception origin:
Console readout & prior conditions:
Error stack:
View register.html
<form remote-form="/accounts/register/" class="register pull-left">
<div ng-repeat="error in errors.non_field_errors" class="alert alert-danger fade in">
{{ error }}
<div class="form-group">
<input remote-form-control="input.first_name" type="text" name="first_name" class="form-control"/>
<div class="form-group">
View forms.js
app.directive('remoteForm', function($http){
function link(scope, formElement, attrs, formController) {
scope.input = {};
scope.submit = function (){
$, scope.input)
.success(function(data, status, headers, config) {
// $window.location.reload();
andrevinsky / SassMeister-input.scss
Created Mar 7, 2014
Generated by
View SassMeister-input.scss
// ----
// Sass (v3.3.0.rc.5)
// Compass (v1.0.0.alpha.18)
// Bourbon (v3.2.0.beta.1.a)
// ----
@import "bourbon/bourbon";
body {
View timer-on-deferreds.js
//Timer on Deferreds
(function (){
var top = this;
var defaults = {
granularity : 500,
name : 'default'
this.Timer = function(timeout, options){
var o = $.extend({}, defaults, options),