Skip to content

Instantly share code, notes, and snippets.

View slonoed's full-sized avatar
🥔

Dmitry Manannikov slonoed

🥔
View GitHub Profile
@slonoed
slonoed / sendgrid-send-email.js
Created October 6, 2016 08:39
send email via sendgrid
const KEY = "SENDGRID KEY HERE";
const fs = require('fs');
const html = fs.readFileSync('./index-1.html', 'utf8');
var helper = require('sendgrid').mail;
var from_email = new helper.Email('e@slonoed.net');
var to_email = new helper.Email('guru.veronika@gmail.com');
var subject = 'Hello World from the SendGrid Node.js Library!';
var content = new helper.Content('text/html',html);
var mail = new helper.Mail(from_email, subject, to_email, content);
https://github.com/neovim/neovim/issues/2048
Add Ctrl+h as Keyboard Shortcut
Choose Send Escape Sequence as Action
Type [104;5u for Esc+
redis:
image: redis
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=sentry
- POSTGRES_USER=sentry
volumes:
- /var/lib/postgresql/data
'use strict';
const _ = require('lodash');
const path = require('path');
const estraverse = require('estraverse');
const esprima = require('esprima');
const recursive = require('recursive-readdir');
const babel = require('babel-core')
const fs = require('fs');
@slonoed
slonoed / lambda-dynamo
Created February 26, 2016 21:17 — forked from markusklems/lambda-dynamo
Short aws lambda sample program that puts an item into dynamodb
// create an IAM Lambda role with access to dynamodb
// Launch Lambda in the same region as your dynamodb region
// (here: us-east-1)
// dynamodb table with hash key = user and range key = datetime
console.log('Loading event');
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'});
exports.handler = function(event, context) {
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
  • 🎨 when improving the format/structure of the code
  • 🚀 when improving performance
  • ✏️ when writing docs
  • 💡 new idea
  • 🚧 work in progress
  • ➕ when adding feature
  • ➖ when removing feature
  • 🔈 when adding logging
  • 🔇 when reducing logging
  • 🐛 when fixing a bug
@slonoed
slonoed / vk_post_remove_script.js
Last active November 24, 2016 07:12
Remove vk.com messages
setInterval(function(){[].forEach.call(document.querySelectorAll('.post_delete_button'), function(e){e.click();e.remove()}); window.scrollTo(0,document.body.scrollHeight);}, 2000)
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em
/**
* Use em or rem font-size in Bootstrap 3
*/
@font-size-root: 14px;
@font-unit: 0rem; // Pick em or rem here
// Convert all variables to em