Skip to content

Instantly share code, notes, and snippets.

Johan Eliasson elitan

Block or report user

Report or block elitan

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
View react-apollo-hasura-with-subscriptions.js
import React, { Component } from 'react';
import { Redirect } from 'react-router-dom';
import { ApolloProvider } from 'react-apollo';
import { InMemoryCache } from 'apollo-cache-inmemory';
import ApolloClient from 'apollo-client';
import { setContext } from 'apollo-link-context';
import { WebSocketLink } from 'apollo-link-ws';
import { HttpLink } from 'apollo-link-http';
import { split } from 'apollo-link';
@elitan
elitan / gist:71b82bd809df81f34a9a778807782437
Created Dec 29, 2017
Ubuntu Bose QC35 bluetooth problem
View gist:71b82bd809df81f34a9a778807782437
> cat /etc/bluetooth/main.conf
ControllerMode = bredr
Disable=Headset
AutoConnect=true
Also:
https://askubuntu.com/questions/689281/pulseaudio-can-not-load-bluetooth-module-15-10-16-04-16-10
@elitan
elitan / ContactForm.js
Last active Aug 27, 2019
React Router V4 Redirect after form submission
View ContactForm.js
import React, { Component } from 'react';
import {
withRouter
} from 'react-router-dom';
class ContactForm extends Component {
submitForm (e) {
e.preventDefault()
View timeElapsedString.php
function timeElapsedString($ptime)
{
$etime = time() - $ptime;
if ($etime < 1)
{
return '0 seconds';
}
$a = array( 12 * 30 * 24 * 60 * 60 => 'år,år',
You can’t perform that action at this time.