Skip to content

Instantly share code, notes, and snippets.

View tkreis's full-sized avatar
🏁

Thomas tkreis

🏁
View GitHub Profile
@tkreis
tkreis / config-overrides.js
Created October 24, 2019 10:49
How to get less loading with react-app-rewire
const webpack = require('webpack');
const externals = require('./config-externals');
const packageJson = require('./package.json');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = {
// The Webpack config to use when compiling your react app for development or production.
webpack: function(config, env) {
Following the installation for both of those packages on react native causes problems, since one is removing the framework path of the other.
Framework Search params should look like this: https://imgur.com/a/09Mam
https://github.com/invertase/react-native-firebase
https://github.com/facebook/react-native-fbsdk
@tkreis
tkreis / gist:4ed41b93bfc8c74ceb48f50e8a2c7a22
Created March 19, 2018 10:25
Polyfill.io and ios webview error
using polyfill.io with the `unknown=polyfil` and with out `flags=gated` breaks react.
@tkreis
tkreis / index.html
Created June 10, 2017 07:39
Web component test
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>&lt;hello-world&gt;</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react-dom.js"></script>
<!-- Imports polyfill -->
<script src="../webcomponentsjs/webcomponents.min.js"></script>
function BinarySearch() {
this.search = function (needle, haystack) {
var middle = parseInt(haystack.length/2),
compareAgainst = haystack[middle];
if(needle == compareAgainst) { return needle; }
if(needle < compareAgainst) { return this.search(needle, haystack.slice(0, middle))}
if(needle >= compareAgainst) { return this.search(needle, haystack.slice(middle))}
return false;
}
@tkreis
tkreis / docker-go-help.md
Created June 15, 2016 22:51
Watching and recompiling code inside of docker.
@tkreis
tkreis / transformUUDI.sql
Last active July 8, 2016 19:57
Transform base64 encoded id as uuid
CREATE OR REPLACE FUNCTION decode_uuid(encoded_uuid text) RETURNS uuid AS $$
BEGIN
RETURN uuid(encode(decode((encoded_uuid || '==') ,'base64'), 'hex'));
END;
$$ LANGUAGE plpgsql;
-- usage
SELECT * from ditto_entity where id = decode_uuid('mttF0tAFSbq1of1oFNfAJw');
@tkreis
tkreis / 0_reuse_code.js
Created March 25, 2016 01:05
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@tkreis
tkreis / gist:5526a634f8bee6473d6b
Created December 15, 2014 23:43
slate config.
var right = slate.operation("push", {
"direction" : "right",
"style" : "bar-resize:screenSizeX/2"
});
var left = slate.operation("push", {
"direction" : "left",
"style" : "bar-resize:screenSizeX/2"
});
@tkreis
tkreis / HowToMaximizeGoogleHangout
Last active December 22, 2015 12:18
How to maximise Video for Google- Hangouts.
document.getElementsByClassName('Ya-sc-sa El-gg')[0].style.width="100%";
document.getElementsByClassName('Ya-sc-sa El-gg')[0].style.height="100%";
document.getElementsByClassName('Ya-sc-sa El-gg')[0].style.position="fixed";
document.getElementsByClassName('Ya-sc-sa El-gg')[0].style.top="0px";