Skip to content

Instantly share code, notes, and snippets.

Avatar

Madd.is EyMaddis

View GitHub Profile
@EyMaddis
EyMaddis / GoogleCastMiniPlayer.java
Created Feb 5, 2021
React Native Google Cast MiniPlayer Base Implementation (Android)
View GoogleCastMiniPlayer.java
package com.yourapp.cast;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.FrameLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@EyMaddis
EyMaddis / Example.tsx
Created Feb 5, 2021
React Native Google Cast MiniPlayer Base Implementation
View Example.tsx
function ExampleComp() {
// height is necessary otherwise it will be 0
return <View style={{ height: 60 }}>
<RNGoogleCastMiniPlayer style={{ flex: 1 }} />
</View>
}
@EyMaddis
EyMaddis / hooks_mediaQueries_toString.ts
Created Feb 20, 2020
React Native for Web SSR Media Queries
View hooks_mediaQueries_toString.ts
export type DeviceSize = 'mobile' | 'small' | 'medium' | 'large'
export const deviceSize: { [key in DeviceSize]: [number, number] } = {
mobile: [0, 575],
small: [576, 767],
medium: [768, 991],
large: [992, 999999999],
}
@EyMaddis
EyMaddis / nuxt.config.js
Created Nov 28, 2018
Postgraphile nested in Nuxt.js
View nuxt.config.js
module.exports = {
serverMiddleware: [
'~/postgraphileServerMiddleware'
]
...
}
@EyMaddis
EyMaddis / README.md
Last active Jan 3, 2017 — forked from lavaxun/README.md
Rancher on docker-for-mac with xhyve
View README.md

Install Docker for Mac (http://beta.docker.com)

Install docker-machine-driver-xhyve (https://github.com/zchee/docker-machine-driver-xhyve)

brew install docker-machine-driver-xhyve
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve

Deploy the latest release

@EyMaddis
EyMaddis / whatsapp-send-in-current-chat.js
Created Nov 4, 2016
Sending messages programmatically on web.whatsapp.com
View whatsapp-send-in-current-chat.js
// this allows to send arbitrary messages. The chat conversation you want to send messages to has to be open.
// just run this in the JS console
// http://stackoverflow.com/a/39165137/1249001
function findReactComponent(dom) {
for (var key in dom)
if (key.startsWith("__reactInternalInstance$")) {
var compInternals = dom[key]._currentElement;
var compWrapper = compInternals._owner;
var comp = compWrapper._instance;