Skip to content

Instantly share code, notes, and snippets.

Avatar

Ctibor Laky luckylooke

View GitHub Profile
@MattSPalmer
MattSPalmer / on-subscribe.js
Last active May 11, 2020
debug subscriptions
View on-subscribe.js
const onSubscribe = (fn) => stream => Rx.defer(() => {
fn();
return stream;
})
const logOnSubscribe = message => onSubscribe(() => console.log(message));
Rx.interval(10e3).pipe(
switchMap(() => interval(200).pipe(
logOnSubscribe('subscribed to 200ms interval')
@cowboy
cowboy / mock-axios.js
Last active Aug 9, 2020
axios mocking via interceptors
View mock-axios.js
import axios from 'axios'
let mockingEnabled = false
const mocks = {}
export function addMock(url, data) {
mocks[url] = data
}
@jbutko
jbutko / express-ionic-nginx.md
Last active Jun 2, 2017
Serve ExpressJS API together with Angular/Ionic static site: Nginx config
View express-ionic-nginx.md
  1. create new file: sudo nano /etc/nginx/sites-available/mysite.com.conf and add:
server {            
        # on which port should nginx listen
        listen 80 default_server;                                                                                                     
        listen [::]:80 default_server;                                                                                                
                                        
        # serve client
        root /home/ionic-app/client/www;                                                                               
        index index.html index.htm;
@discordier
discordier / gist:ed4b9cba14652e7212f5
Created Dec 4, 2014
options for phpStorm @noinspection annotation
View gist:ed4b9cba14652e7212f5
javascript
ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
JSConsecutiveCommasInArrayLiteralInspection
@jiripudil
jiripudil / spinner.html
Created Aug 17, 2013
Pure JavaScript spinner
View spinner.html
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Pure JS spinner</title>
<style>
#spinner { font-size: 6em; }
</style>
You can’t perform that action at this time.