Skip to content

Instantly share code, notes, and snippets.

VladimirPal / neomuttrc
Last active Jul 28, 2022
Minimal neomutt config for gmail imap
View neomuttrc
set imap_user=""
set imap_pass=`/usr/bin/security find-generic-password -w -a '' -s 'Gmail'`
set folder=imaps://
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed="+[Gmail]/Drafts"
# search sleep_time for additional info
set sleep_time=0 # be faster
View select-size-component.js
export default React.createClass({
propTypes: {
sizes: React.PropTypes.array
render() {
return (
View gist:dda9ffc6386d3b4e2ceb
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true
"settings": {
"ecmascript": 6,
"jsx": true
View validate-mixin.js
import $ from 'jquery';
import React from 'react';
let capitalizeFirstLetter = (string) => {
return string.charAt(0).toUpperCase() + string.slice(1);
let validateHelper = {
required(value, name) {
if (value) {
VladimirPal /
Last active Mar 22, 2021
default value alembic
# Boolean
op.add_column('projects', sa.Column('is_closed', sa.Boolean(), server_default=sa.schema.DefaultClause("0"), nullable=False))
# DateTime
op.add_column('projects_users', sa.Column('created_at', sa.DateTime(), server_default=sa.func.current_timestamp(), nullable=False))
from flask.ext.restful import marshal_with
from flask.ext.jwt import current_user
from functools import wraps
class marshal_rm_role(object):
def __init__(self, fields, role, remove_fields):
self.fields = fields
self.role = role
self.remove_fields = remove_fields
View gist:d703d5715966c641dd38
op.add_column('projects', sa.Column('is_closed', sa.Boolean(), server_default=sa.schema.DefaultClause("0"), nullable=False))
# -*- coding: utf-8 -*-
import json
import tornado.ioloop
import tornado.web
from toredis import Client
import sockjs.tornado
from util.utils import AESCipher
from util.coin_api import config
"blur form input": "validateInput"
validateInput: (ev) ->
$input = $(
input_name = $( 'name'
input_value = $(
if input_value.length
@model.set input_name, input_value
@model.isValid input_name
View gist:dc66fc85c29e294c39f8
module.exports = class MainController extends Marionette.Object
queuMethod: false
initialize: ->
App.vent.on 'profile:ready', () =>
if @queuMethod
@queuMethod = false
dashboard: ->