Skip to content

Instantly share code, notes, and snippets.

View GaborWnuk's full-sized avatar

Gabor Wnuk GaborWnuk

View GitHub Profile
@GaborWnuk
GaborWnuk / traceroute
Created October 21, 2021 18:08
Starlink traceroute to wp.pl
$ traceroute wp.pl
traceroute to wp.pl (212.77.98.9), 64 hops max, 52 byte packets
1 openwrt (192.168.1.1) 2.463 ms 1.850 ms 4.253 ms
2 136.22.97.161 (136.22.97.161) 46.257 ms 47.621 ms 48.280 ms
3 136.22.254.46 (136.22.254.46) 40.607 ms 52.223 ms 40.317 ms
4 108.170.252.19 (108.170.252.19) 48.049 ms
108.170.252.83 (108.170.252.83) 55.325 ms 46.566 ms
5 108.170.236.249 (108.170.236.249) 50.249 ms
108.170.238.60 (108.170.238.60) 45.171 ms
209.85.252.29 (209.85.252.29) 57.876 ms
@GaborWnuk
GaborWnuk / App.js
Created December 27, 2018 09:51
App.js for React Native CarPlay
import React, { Component, PureComponent } from "react";
import { FlatList, Image, NativeModules, StyleSheet, Text, TouchableOpacity, View } from "react-native";
import { ReactNativeAudioStreaming } from "react-native-audio-stream";
type ChannelLogo = { url: string };
type Channel = { id: number, name: string, logo: ChannelLogo };
type ChannelItemType = { logo: ChannelLogo, name: string };
const ChannelItem = ({ channel }: Channel) => (
@GaborWnuk
GaborWnuk / AppDelegate.m
Created September 22, 2018 12:41
AppDelegate.m for React Native Car Play
#import "AppDelegate.h"
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
NSURL *jsCodeLocation;
@GaborWnuk
GaborWnuk / AppDelegate.h
Created September 22, 2018 12:37
AppDelegate.h for React Native Car Play
@import AVFoundation;
@import MediaPlayer;
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate, MPPlayableContentDataSource, MPPlayableContentDelegate>
@property (nonatomic, strong) UIWindow *window;
@property (nonatomic, retain) NSArray *channels;
@property (nonatomic, retain) AVPlayer *player;
@GaborWnuk
GaborWnuk / RNChannels.m
Created September 22, 2018 12:34
RNChannels.m for React Native Car Play
#import "AppDelegate.h"
#import "RNChannels.h"
@interface RNChannels()
@end
@implementation RNChannels
RCT_EXPORT_MODULE()
@GaborWnuk
GaborWnuk / zsh
Last active August 28, 2018 07:48
Enable CarPlay simulator in iOS Simulator
defaults write com.apple.iphonesimulator CarPlay -bool YES
@GaborWnuk
GaborWnuk / FancyViewManager.kt
Created August 1, 2018 16:16
FancyViewManager.kt for React Native
package pl.wp.wdi
// (...)
class FancyViewManager: SimpleViewManager<View>() {
override fun getName(): String {
return "FancyViewManager"
}
override fun createViewInstance(reactContext: ThemedReactContext?): View {
@GaborWnuk
GaborWnuk / FancyViewManager.m
Created August 1, 2018 16:10
FancyViewManager.m for React Native
#import "FancyViewManager.h"
#import <React/UIView+React.h>
@interface FancyViewManager ()
@end
@implementation FancyViewManager
/*
We could either remove "FancyViewManagerManager" here and rename Android module,
@GaborWnuk
GaborWnuk / App.js
Created August 1, 2018 16:01
App.js for React Native project based on Kotlin with Promise
export default class App extends Component<Props> {
// (...)
render() {
return (
<View style={styles.container}>
// We've added text="hello" here
<RNFancyViewManager text="hello" style={{ width: 160, height: 160 }} />
// (...)
</View>
@GaborWnuk
GaborWnuk / App.js
Created August 1, 2018 11:26
App.js for React Native project based on Kotlin with Promise
import React, { Component } from "react";
// (...)
import { requireNativeComponent, NativeModules } from "react-native";
class FancyViewManager extends React.Component {
render() {
return <RNFancyViewManager {...this.props} />;
}
}