Skip to content

Instantly share code, notes, and snippets.

Avatar

Oleg Shalygin oshalygin

View GitHub Profile
View keyboard shortcuts
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "shift+cmd+f",
"command": "editor.action.format",
"when": "editorTextFocus"
},
{
"key": "shift+cmd+f",
"command": "editor.action.formatDocument",
View zsh config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# if [ "$TMUX" = "" ]; then tmux; fi
# source ~/.fonts/*.sh
export TERM="xterm-256color"
# Path to your oh-my-zsh installation.
export ZSH=/Users/oleqshalygin/.oh-my-zsh
View keybase.md

Keybase proof

I hereby claim:

  • I am oshalygin on github.
  • I am oshalygin (https://keybase.io/oshalygin) on keybase.
  • I have a public key ASAkN5Gzk7ie_XgMYR2o4e1AKXtAnx9tWShbuTTDHZcWMAo

To claim this, I am signing this object:

@oshalygin
oshalygin / mongodb_lookup.go
Created May 28, 2018 — forked from sindbach/mongodb_lookup.go
A simple example of how to use $lookup in Golang using mgo.
View mongodb_lookup.go
package main
import (
"fmt"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
func main() {
session, err := mgo.Dial("localhost")
if err != nil {
@oshalygin
oshalygin / clink.lua
Created Dec 26, 2017
cmder prompt configuration
View clink.lua
@oshalygin
oshalygin / hyper.js
Created Dec 26, 2017
Hyper.js config on Windows
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
View authControllerWithErrorHandling.js
import GoogleAuth from 'google-auth-library';
import { googleAuthClientId } from '../../src/constants/config';
import { User } from '../utilities/database';
import { path } from 'ramda';
const checkUserToken = token => {
return new Promise((resolve, reject) => {
const auth = new GoogleAuth();
const client = new auth.OAuth2(googleAuthClientId, '', '');
client.verifyIdToken(token, googleAuthClientId, (error, login) => {
View authController.js
import GoogleAuth from 'google-auth-library';
import { googleAuthClientId } from '../../src/constants/config';
import { User } from '../utilities/database';
import { path } from 'ramda';
const checkUserToken = token => {
return new Promise((resolve, reject) => {
const auth = new GoogleAuth();
const client = new auth.OAuth2(googleAuthClientId, '', '');
client.verifyIdToken(token, googleAuthClientId, (error, login) => {
You can’t perform that action at this time.