Skip to content

Instantly share code, notes, and snippets.

@nikgalushko
nikgalushko / move-stashes.md
Created December 29, 2018 07:50 — forked from alexeds/move-stashes.md
Move your stashes from one repo to another

Move your stashes from one repo to another


This was useful for me when we created a new branch for a new major release, but were still working on our current version as well. I cloned our repo again and kept the new project on our new branch, but also wanted to get my stashes there.

Download your stashes

git stash show -p > patch

You'll have to specify your stash and name your file whatevery you want. Do this for as all your stashes, and you'll have patch files in your pwd.

'use strict';
const NODE_ENV = process.env.NODE_ENV || "development"; //переменная окружения нужная для переключения между dev/prod
const webpack = require('webpack');
module.exports = {
context: __dirname + "/frontend", //указывается root, где искать файлы для entry
entry: { //объект, когда несколько точек входа. строка, когда одна
home: "./home",
about: "./about",
// Поместите настраиваемые сочетания клавиш в этот файл, чтобы перезаписать клавиши по умолчанию.
[
{
"key": "shift+cmd+-",
"command": "editor.foldAll",
"when": "editorTextFocus"
},
{
"key": "cmd+k cmd+0",
"command": "-editor.foldAll",
{
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"window.zoomLevel": 0,
"explorer.confirmDelete": false,
"editor.tabCompletion": true,
"explorer.confirmDragAndDrop": false
}
@nikgalushko
nikgalushko / godoc output
Created October 1, 2018 14:05 — forked from cthom06/godoc output
Godoc example
PACKAGE
package example
import "example"
This is the package comment, a top-level piece of documentation
used to explain things about the package (see json or exp/template)
All godoc comments are in this form
with no whitespace between them and what they accompany
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nikgalushko
nikgalushko / custom_json.go
Created December 23, 2016 09:43 — forked from mdwhatcott/custom_json.go
Example of implementing MarshalJSON and UnmarshalJSON to serialize and deserialize custom types to JSON in Go. Playground: http://play.golang.org/p/7nk5ZEbVLw
package main
import (
"bytes"
"encoding/json"
"fmt"
"strconv"
)
func main() {
@nikgalushko
nikgalushko / mgoExample.go
Created December 1, 2016 12:29 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
chrome.browserAction.onClicked.addListener(
function(tab) {
var currentURL = tab.url;
if (currentURL.indexOf("gyazo") == -1)
return;
console.log(currentURL.split("/"));
var src = "http://i.gyazo.com/" + currentURL.split("/").pop() + ".png";
var xhr = new XMLHttpRequest();
xhr.open("GET", "http://qps.ru/api?url=" + src + "&format=text", true);
xhr.onreadystatechange = function () {

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt