Skip to content

Instantly share code, notes, and snippets.

@Olgagr
Olgagr / index.html
Created August 24, 2016 16:28 — forked from anonymous/index.html
combineLatest
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="mapTo">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.1/dist/global/Rx.umd.js"></script>
<title>JS Bin</title>
</head>
<body>
@Olgagr
Olgagr / index.html
Last active August 24, 2016 04:51 — forked from anonymous/index.html
merge
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="mapTo">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.1/dist/global/Rx.umd.js"></script>
<title>JS Bin</title>
</head>
<body>
@Olgagr
Olgagr / index.html
Last active August 24, 2016 04:29 — forked from anonymous/index.html
mapTo/startWith/switchMapTo/scan
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="mapTo">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script src="https://npmcdn.com/@reactivex/rxjs@5.0.0-beta.1/dist/global/Rx.umd.js"></script>
<title>JS Bin</title>
</head>
<body>
@Olgagr
Olgagr / react_authorization.js
Created November 7, 2015 13:37
react authorization
requireAuth: function(nextState, replaceState) {
if (!AuthStore.isAuthenticated()) {
replaceState({ nextPathname: nextState.location.pathname }, '/');
}
},
render: function() {
return (
<Layout>
<Router history={history}>
@Olgagr
Olgagr / gulpfile.js
Last active July 5, 2017 10:39
watchify
var customOpts = {
entries: [config.jsES6MainFile],
debug: true,
transform: ['babelify']
};
var opts = _.assign({}, watchify.args, customOpts);
var b = watchify(browserify(opts));
gulp.task('scripts', bundle);
b.on('update', bundle);
@Olgagr
Olgagr / gulp_aws_deploy.js
Created October 28, 2014 11:38
Gupl aws deployment script
function deploy(env) {
var bucketSuffix = env === 'staging' ? '-staging' : '';
var publisher = $.awspublish.create({
key: 'xxxx',
secret: 'xxx',
bucket: 'picaly.co' + bucketSuffix,
region: 'eu-west-1'
});
return gulp.src('./dist/**/*')
module Heroku
module Rake
class Task
attr_accessor :name
def initialize(name)
@name = name
end
def self.[](name)
Heroku::Rake::Task.new(name)
@Olgagr
Olgagr / gist:4192bae863b9b6497e6f
Created September 28, 2014 06:08
Sinatra router implementation - not working
# This implementation causes error:
# ArgumentError: wrong number of arguments (0 for 1..3)
# config.ru:10:in `instance_eval'
# config.ru:10:in `initialize'
# config.ru:26:in `new'
# config.ru:26:in `block in inner_app'
# /Users/ograbek/.rvm/gems/ruby-2.1.2@owning_rails/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
# /Users/ograbek/.rvm/gems/ruby-2.1.2@owning_rails/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
@Olgagr
Olgagr / new_gist_file_0
Created December 7, 2013 12:58
Terminal: Set Sublime editor to open from terminal
Make symlink:
ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/local/bin/sublime
And then open and edit .bash_profile:
export EDITOR='sublime -w'