Skip to content

Instantly share code, notes, and snippets.

Petr Bela petrbela

Block or report user

Report or block petrbela

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
petrbela / poll_production.json
Last active Aug 20, 2018
Medium: Apple Subscriptions? WAT?!
View poll_production.json
"status": 0,
"environment": "Production",
"receipt": {
"latest_receipt_info": [],
"latest_receipt": "...",
"pending_renewal_info": [
"auto_renew_product_id": "com.sweatflex.flex.monthly",
"original_transaction_id": "...",
petrbela / Fastfile
Last active Jul 2, 2018
React Native deployment
View Fastfile
# This file contains the configuration
# You can find the documentation at
# For a list of all available actions, check out
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
petrbela /
Last active Jun 13, 2017
Install TF + CUDA on Mac

Notes from installing CUDA and TensorFlow on a MacBook Pro 15" 2013 with GeForce 650M

  1. Download CUDA and run installer (see notes)
  2. Go to System Preferences > CUDA and update driver version if prompted.
  3. Make sure deviceQuery lists your GPU
  4. Add cuda to syspath
    export PATH=$PATH:/usr/local/cuda/bin
  5. Download CuDNN (TF on pip currently compiled for version 5.x), unpack and move to /usr/local/cuda
petrbela / cloudSettings
Last active Jun 13, 2019
Visual Studio Code Sync Settings GIST
View cloudSettings
petrbela / 0_reuse_code.js
Created Oct 22, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
petrbela / Album.js
Last active Mar 26, 2017
GraphQL types in separate files
View Album.js
'use strict'
import {
} from 'graphql'
import Types from './Types'
Types.Album = new GraphQLObjectType({
petrbela /
Created May 12, 2015
Elasticsearch rolling restart
# Copied from
# perform a rolling restart of all data/master nodes in a stable cluster
# args: [-i|--interactive] [elasticsearch-host:port]
petrbela /
Last active Aug 29, 2015
Keybase proof

Keybase proof

I hereby claim:

  • I am petrbela on github.
  • I am petrbela ( on keybase.
  • I have a public key whose fingerprint is C6BB 7046 2330 28DE C757 02CA 4A28 5F03 51EA 3821

To claim this, I am signing this object:

View designer.html
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
:host {
position: absolute;
petrbela / Geo_distance.lua
Last active Aug 29, 2015
ApiTools SFPark geo distance middleware
View Geo_distance.lua
return function(request, next_middleware)
local function geo_distance(lat1, lon1, lat2, lon2)
if lat1 == nil or lon1 == nil or lat2 == nil or lon2 == nil then
return nil
local dlat = math.rad(lat2-lat1)
local dlon = math.rad(lon2-lon1)
local sin_dlat = math.sin(dlat/2)
local sin_dlon = math.sin(dlon/2)
local a = sin_dlat * sin_dlat + math.cos(math.rad(lat1)) * math.cos(math.rad(lat2)) * sin_dlon * sin_dlon
You can’t perform that action at this time.