Skip to content

Instantly share code, notes, and snippets.

Rudolf Olah rudolfolah

Block or report user

Report or block rudolfolah

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
@rudolfolah
rudolfolah / example.js
Created Sep 24, 2018
Rx.js example for buffering numbers and then grouping them without using the groupBy operator and then using reduce to convert them into a single updated value
View example.js
var numbers = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21];
Rx.Observable
.from(numbers)
.bufferCount(5)
.reduce(function(stats, buffered) {
var evenCount = stats.evens;
var oddCount = stats.odds;
for (var i = 0; i < buffered.length; i += 1) {
if (buffered[i] % 2 === 0) {
evenCount += 1;
@rudolfolah
rudolfolah / src2png.sh
Created Nov 5, 2017
Generating images of code using Pygments (similar to src2png)
View src2png.sh
#!/bin/bash
# requires Pygments
# sudo pip install pygments Pillow
#
# Usage:
# src2png.sh hello.py hello.png
FONT_NAME='Andale Mono'
INPUT=$1
OUTPUT=$2
pygmentize -O font_name=${FONT_NAME},line_numbers=false,font_size=16 -o "${OUTPUT}" "${INPUT}"
@rudolfolah
rudolfolah / keybase.md
Created Sep 27, 2017
Android created Gist
View keybase.md

Keybase proof

I hereby claim:

  • I am omouse on github.
  • I am rudolfolah (https://keybase.io/rudolfolah) on keybase.
  • I have a public key ASAD_DR_WzDCAMWcM174jrfVgS2Rq4mtSfU9vzsnCxpSKAo

To claim this, I am signing this object:

@rudolfolah
rudolfolah / index.html
Created Apr 7, 2017
JS Bin [Testing AngularJS 1.x Services that use $resource with Jasmine] // source https://jsbin.com/qiniyow
View index.html
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[Testing AngularJS 1.x Services that use $resource with Jasmine]">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script type="text/javascript" src="https://jeromecovington.github.io/jasmine-all/jasmine-all.js"></script>
<script src="https://code.angularjs.org/1.6.4/angular.js"></script>
<script src="https://code.angularjs.org/1.6.4/angular-resource.js"></script>
@rudolfolah
rudolfolah / .stylelintrc
Created Jan 19, 2017
Example of writing a custom rule and plugin for stylelint
View .stylelintrc
{
"extends": "stylelint-config-standard",
"rules": {
"neverfriday/no-visibility-allowed": true
},
"plugins": [
"./neverfriday-stylelint-plugin.js"
]
}
@rudolfolah
rudolfolah / di-fm-radio-streams.pl6
Last active Sep 18, 2016
di-fm-radio-streams.pl6 - list all radio streams and urls for Digitally Imported
View di-fm-radio-streams.pl6
# Grabs the list of .pls radio stream files for Digitally Imported
#
# Copyright (C) 2016 Rudolf Olah
use JSON::Tiny;
use HTTP::UserAgent;
my $url = 'http://listen.di.fm/public2/';
my $ua = HTTP::UserAgent.new(:timeout(5));
my $response = $ua.get($url);
@rudolfolah
rudolfolah / make-ruby-rails-yard-docs.sh
Created Aug 10, 2016
Create YARD docs for a ruby on rails project
View make-ruby-rails-yard-docs.sh
yard doc --embed-mixins -o ruby-docs app/{controllers,extensions,helpers,interactors,mailers,models,serializers,uploaders,views,workers} lib/**/*.rb config/**/*.rb
@rudolfolah
rudolfolah / app.html
Created Jul 16, 2016
angular-translate example
View app.html
<h1>{{ 'HELLO' | translate }}</h1>
<h2 translate="HELLO"></h2>
<p translate>HELLO</p>
@rudolfolah
rudolfolah / promise-twitter-example.js
Created Apr 22, 2016
Example of usin node-oauth-libre promises for OAuth 1.0 with Twitter
View promise-twitter-example.js
var http = require('http');
var oauth = require('oauth-libre').OAuthPromise;
var express = require('express');
var callbackURL = 'http://localhost:5000/oauth_callback';
var yourConsumerKey = 'INSERT YOUR CONSUMER KEY HERE';
var yourConsumerSecret = 'INSERT YOUR CONSUMER SECRET KEY HERE';
var reqTokenSecrets = {};
@rudolfolah
rudolfolah / gist:5e3f958829db3ffedb3a
Created Sep 23, 2015
reactjs auto-complete mode dictionary
View gist:5e3f958829db3ffedb3a
React.Component
React.createClass
React.createElement
React.cloneElement
React.createFactory
React.render
React.unmountComponentAtNode
React.renderToString
React.renderToStaticMarkup
React.isValidElement
You can’t perform that action at this time.