This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function isIOS() { | |
// deprecated api but still exists in mobile safari for now | |
if (navigator.platform) { | |
return ( | |
[ | |
"iPad Simulator", | |
"iPhone Simulator", | |
"iPod Simulator", | |
"iPad", | |
"iPhone", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { | |
withPlugins, | |
withDangerousMod, | |
withInfoPlist, | |
} = require("@expo/config-plugins"); | |
const fs = require("fs"); | |
const path = require("path"); | |
async function readFileAsync(path) { | |
return fs.promises.readFile(path, "utf8"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ReSocket { | |
private token: string | undefined; | |
private socket: WebSocket | undefined; | |
private listeners: boolean = false; | |
private currentAttempt: number = 0; | |
private backoffTime: number = 1000; | |
private maxAttempts: number = 30; | |
private timer: NodeJS.Timeout | undefined; | |
private messageFn: (data: any) => void = (data) => { | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StyleSheet } from "react-native"; | |
/* | |
Example: Normal Theme | |
----------- | |
const themes = { | |
default: { | |
colors: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const postmanEnv = { | |
"id": "7a40704a-d4e2-4948-ba35-826a93f2bf0f", | |
"name": "local", | |
"values": [ | |
// values would go here | |
], | |
"_postman_variable_scope": "environment", | |
"_postman_exported_at": "2019-04-23T18:36:01.716Z", | |
"_postman_exported_using": "Postman/7.0.9" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const Scaper = require("@jonstuebe/scraper"); | |
const app = express(); | |
const port = 3000; | |
app.get("/", async ({ query }, res) => { | |
if (!query.url) { | |
// handle error here | |
// res.status(500); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright 2017 Bryan Keller (https://github.com/widget-) | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Don't want to interpret variables whilst reading from the HEREDOC - thus the single quotes... potto | |
cat << 'EOF' >> /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js | |
document.addEventListener('DOMContentLoaded', function() { | |
$.ajax({ | |
url: 'https://gist.githubusercontent.com/jonstuebe/bddadd625c0e8a66d430022ef652fc2a/raw/fe750d4886b593207ffa1331ad93a84200828812/slack-dark.css', | |
success: function(css) { | |
$("<style></style>").appendTo('head').html(css); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { background: #222; color: #e6e6e6; } | |
a { color: #949494; } | |
a:link, a:visited { color: #949494; } | |
a:hover, a:active, a:focus { color: #c7c7c7; } | |
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
import logo from './logo.svg'; | |
import './App.css'; | |
import { BrowserRouter as Router } from 'react-router-dom'; | |
import Link from './components/Link'; | |
import { Routes } from './routes'; | |
class App extends Component { | |
render() { |
NewerOlder