Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Bitcollage SerkanSipahi

🎯
Focusing
Block or report user

Report or block SerkanSipahi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SerkanSipahi
SerkanSipahi / rxjs-draggable.js
Last active Sep 10, 2018
draggable div element with rxjs v6.3.2
View rxjs-draggable.js
let draggableEl = document.querySelector('.draggable');
let mouseup$ = fromEvent(document, 'mouseup');
let mousemove$ = fromEvent(document, 'mousemove');
let mousedown$ = fromEvent(draggableEl, 'mousedown');
let mousedrag$ = mousedown$.pipe(
mergeMap(({offsetX, offsetY}) =>
mousemove$.pipe(
map(({clientX, clientY}) => ({
View gist:f89bccd350d410de5b8a3def2a7043a2
last msg: {'EXIT',<0.4251.0>,{{badmatch,{error,enoent}},[{couch_compaction_daemon,abs_path,1,[{file,"src/couch_compaction_daemon.erl"},{line,526}]},{couch_compaction_daemon,free_space_rec,2,[{file,"src/couch_compaction_daemon.erl"},{line,517}]},{couch_compaction_daemon,can_db_compact,2,[{file,"src/couch_compaction_daemon.erl"},{line,327}]},{couch_compaction_daemon,maybe_compact_db,3,[{file,"src/couch_compaction_daemon.erl"},{line,164}]},{couch_compaction_daemon,'-compact_loop/1-fun-0-',3,[{file,"src/couch_compaction_daemon.erl"},{line,141}]},{couch_server,'-all_databases/2-fun-0-',4,[{file,"src/couch_server.erl"},{line,273}]},{filelib,do_fold_files2,8,[{file,"filelib.erl"},{line,184}]},{filelib,do_fold_files2,8,[{file,"filelib.erl"},{line,194}]}]}}
state: {state,<0.4251.0>,[]}
[error] 2017-10-07T15:05:56.705451Z couchdb@localhost <0.4249.0> -------- CRASH REPORT Process couch_compaction_daemon (<0.4249.0>) with 0 neighbors exited with reason: {compaction_loop_died,{{badmatch,{error,enoent}},[{couch_com
View gist:560305e14e89a08a27adf74ad070c91a
00000000 63 75 72 6c 20 2d 58 20 50 55 54 20 68 74 74 70 |curl -X PUT http|
00000010 3a 2f 2f 6c 6f 63 61 6c 68 6f 73 74 3a 35 39 38 |://localhost:598|
00000020 34 2f 5f 75 73 65 72 73 2f 6f 72 67 2e 63 6f 75 |4/_users/org.cou|
00000030 63 68 64 62 2e 75 73 65 72 3a 66 6f 6f 20 2d 48 |chdb.user:foo -H|
00000040 20 22 41 63 63 65 70 74 3a 20 61 70 70 6c 69 63 | "Accept: applic|
00000050 61 74 69 6f 6e 2f 6a 73 6f 6e 22 20 2d 48 20 22 |ation/json" -H "|
00000060 43 6f 6e 74 65 6e 74 2d 54 79 70 65 20 61 70 70 |Content-Type app|
00000070 6c 69 63 61 74 69 6f 6e 2f 6a 73 6f 6e 22 20 2d |lication/json" -|
00000080 48 20 22 49 66 2d 4d 61 74 63 68 3a 20 33 2d 63 |H "If-Match: 3-c|
00000090 39 38 39 63 61 66 65 62 32 63 31 61 34 37 61 32 |989cafeb2c1a47a2|
View example.go
// #########################################
// rest/get.go
// #########################################
// This is working but its not what i want.
func GET(c echo.Context) error {
// do something
}
// This is not working.
@SerkanSipahi
SerkanSipahi / promises.md
Created May 25, 2016 — forked from domenic/promises.md
You're Missing the Point of Promises
View promises.md

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
    // the rest of your code goes here.
@SerkanSipahi
SerkanSipahi / .eslintrc.js
Created Dec 26, 2015 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
View .eslintrc.js
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@SerkanSipahi
SerkanSipahi / jspm.travis.setup.md
Created Nov 30, 2015 — forked from topheman/jspm.travis.setup.md
Travis setup of Github token for jspm
View jspm.travis.setup.md
@SerkanSipahi
SerkanSipahi / Install_tmux
Created Oct 3, 2015 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
View Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
View essential-javascript-links.md
You can’t perform that action at this time.