This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.4.6) | |
// Compass (v1.0.1) | |
// ---- | |
@function media-querie($screen,$range) { | |
$range-value: map-has-key($screen-list, $screen); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function callAjax(url, callback){ | |
var xmlhttp; | |
// compatible with IE7+, Firefox, Chrome, Opera, Safari | |
xmlhttp = new XMLHttpRequest(); | |
xmlhttp.onreadystatechange = function(){ | |
if (xmlhttp.readyState == 4 && xmlhttp.status == 200){ | |
callback(xmlhttp.responseText); | |
} | |
} | |
xmlhttp.open("GET", url, true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var opts = { | |
method: 'GET', | |
body: 'json', | |
headers: {} | |
}; | |
fetch('/get-data', opts).then(function (response) { | |
return response.json(); | |
}) | |
.then(function (body) { | |
//doSomething with body; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import isPlainObject from 'lodash/isPlainObject' | |
import $$observable from 'symbol-observable' | |
export var ActionTypes = { | |
INIT: '@@redux/INIT' | |
} | |
export default function createStore(reducer, preloadedState, enhancer) { | |
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') { | |
enhancer = preloadedState |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This part of code is copied from Dan Abramov answer - https://stackoverflow.com/a/33044701/2902013 | |
import { combineReducers } from 'redux'; | |
import { createStore } from 'redux'; | |
//couple of reducers available as part of inital config of app. | |
import users from './reducers/users'; | |
import posts from './reducers/posts'; | |
function createReducer(asyncReducers) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ServiceSettings": { | |
"SiteURL": "http://localhost:8065", | |
"LicenseFileLocation": "", | |
"ListenAddress": ":8065", | |
"ConnectionSecurity": "", | |
"TLSCertFile": "", | |
"TLSKeyFile": "", | |
"UseLetsEncrypt": false, | |
"LetsEncryptCertificateCacheFile": "./config/letsencrypt.cache", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```` | |
{ | |
"data": { | |
"AboutLink": "https://about.mattermost.com/default-about/", | |
"AllowEditPost": "always", | |
"AndroidAppDownloadLink": "https://about.mattermost.com/mattermost-android-app/", | |
"AndroidLatestVersion": "", | |
"AndroidMinVersion": "", | |
"AppDownloadLink": "https://about.mattermost.com/downloads/", | |
"AvailableLocales": "", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"level":"debug","ts":1531823529.7227802,"caller":"web/handlers.go:50","msg":"GET - /api/v4/channels/4tqx1ha5qbfj5mqhnqsxqawj7e/posts/unread"} | |
{"level":"error","ts":1531823529.7244754,"caller":"app/server.go:60","msg":"Please check the std error output for the stack trace"} | |
{"level":"error","ts":1531823529.7298934,"caller":"app/server.go:61","msg":"[runtime error: invalid memory address or nil pointer dereference]"} | |
goroutine 2220 [running]: | |
runtime/debug.Stack(0x0, 0x0, 0x1c6d960) | |
/usr/local/Cellar/go/1.10.2/libexec/src/runtime/debug/stack.go:24 +0xa7 | |
runtime/debug.PrintStack() | |
/usr/local/Cellar/go/1.10.2/libexec/src/runtime/debug/stack.go:16 +0x22 | |
github.com/mattermost/mattermost-server/vendor/github.com/gorilla/handlers.recoveryHandler.log(0x2026060, 0xc421d1c140, 0x2026080, 0x28279d8, 0x1, 0xc4212b46f0, 0x1, 0x1) | |
/Users/sudheer.t/go/src/github.com/mattermost/mattermost-server/vendor/github.com/gorilla/handlers/recovery.go:89 +0x70 |
OlderNewer