Skip to content

Instantly share code, notes, and snippets.

Rafal Pastuszak paprikka

Block or report user

Report or block paprikka

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
paprikka / Preferences.sublime-settings
Created Sep 27, 2013
A generic ST config for Mac & Windows. Don't forget to install Package Control and feed this baby with plugins!
View Preferences.sublime-settings
View let.js
"use strict"
var a = 'foo';
function foo() {
var a = 'bar';
paprikka / preloadGUI.cs
Created Dec 6, 2016
Poor man's prefabs
View preloadGUI.cs
public class GUIScreenLoader
private Transform container;
private MainNavGUIConfig config; // a ScriptableObject with a list of easily editable components
// it also contains a GUI Scene reference, for more control over
// resource loading.
public GUIScreenLoader(MainNavGUIConfig config, Transform container)
this.config = config;
$ npm i -g lana-cli
# or
$ yarn global add lana-cli
paprikka / import.json
Created Apr 23, 2017
ES import with better autocomplete
View import.json
// Add this to your VSCode snippets
"import": {
"prefix": "imm",
"description": "ES module import",
"body": [
"import ${2:scope} from '${1:moduleName}'",
paprikka / sharedRouter.js
Created Oct 16, 2017
Shared router event subscriptions in Next.js
View sharedRouter.js
// usage:
// 1. import in your page/component/layout
// 2. subscribe in componentDidMount
// 3. make sure you unsubscribe in componentWillUnmount
import Router from 'next/router'
import { Observable } from 'rxjs'
console.log('route: initialising router')
export const routeChangeStart$ = Observable.create(
paprikka / createRequestHandler.ts
Created Dec 7, 2017
Handle Restify endpoints as Observables using RxJS
View createRequestHandler.ts
import { Observable, Subscription } from 'rxjs'
import {
} from 'restify'
export interface RequestContext {
req: Request,
res: Response,
paprikka / route.js
Created Oct 27, 2018
Hapi route example
View route.js
import Joi from 'joi';
import Events from '../events';
const route = {
handler: ({params: {props}}, reply) => {
let parsedData;
try {
parsedData = JSON.parse(decodeURIComponent(props));
} catch (err) {
You can’t perform that action at this time.