Skip to content

Instantly share code, notes, and snippets.

View JannisRex's full-sized avatar

Jannis Rex JannisRex

  • Germany
View GitHub Profile
@JannisRex
JannisRex / config.yaml
Created April 1, 2020 07:05
Config File for CircleCI (Runs Lint&Tests then Build)
version: 2.1
jobs:
build:
docker:
- image: circleci/node:10
working_directory: ~/ProjektArbeit-FIAE
steps:
- checkout
- restore_cache:
@JannisRex
JannisRex / ErrorBoundary.test.native.js
Created April 1, 2020 07:05
Jest Test for <ErrorBoundary />
import React from 'react'
import { Text, View } from 'react-native'
import renderer from 'react-test-renderer'
import { ErrorBoundary } from '../../src/components/index'
describe('ErrorBoundary', () => {
let consoleErrorSpy
let errorMock
let workingComponent
@JannisRex
JannisRex / .eslintrc.js
Created April 1, 2020 07:04
Config File for ESLint
module.exports = {
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"browser": true,
"node": true,
"es6": true,
"jest": true
},
"globals": {
@JannisRex
JannisRex / GetVideoUrl.js
Last active November 23, 2019 14:03
GreaseMonkey - Download PlaysTV Video with Title
// ==UserScript==
// @name GetVideoUrl
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// @require https://gist.githubusercontent.com/JannisRex/4e61fd1707d65c6e51addd5a2abc34e9/raw/5b151dcf23aecb9b285a5ddbb3bf80a16e13f9d4/download.js
// @match https://plays.tv/video/*
// @noframes
// @grant GM.deleteValue
// @grant GM.getValue
// @grant GM.setValue
@JannisRex
JannisRex / download.js
Created November 23, 2019 10:37
rndme/download
//download.js v4.21, by dandavis; 2008-2018. [MIT] see http://danml.com/download.html for tests/usage
;(function(root,factory){typeof define=="function"&&define.amd?define([],factory):typeof exports=="object"?module.exports=factory():root.download=factory()})(this,function(){return function download(data,strFileName,strMimeType){var self=window,defaultMime="application/octet-stream",mimeType=strMimeType||defaultMime,payload=data,url=!strFileName&&!strMimeType&&payload,anchor=document.createElement("a"),toString=function(a){return String(a)},myBlob=self.Blob||self.MozBlob||self.WebKitBlob||toString,fileName=strFileName||"download",blob,reader;myBlob=myBlob.call?myBlob.bind(self):Blob,String(this)==="true"&&(payload=[payload,mimeType],mimeType=payload[0],payload=payload[1]);if(url&&url.length<2048){fileName=url.split("/").pop().split("?")[0],anchor.href=url;if(anchor.href.indexOf(url)!==-1){var ajax=new XMLHttpRequest;return ajax.open("GET",url,!0),ajax.responseType="blob",ajax.onload=function(e){download(e.tar
@JannisRex
JannisRex / German-Zip-Codes-minified.json
Last active December 9, 2019 09:49 — forked from jbspeakr/German-Zip-Codes.csv
list of German zip codes (Postleitzahl), including dialing code, name of the city and federal state.
This file has been truncated, but you can view the full file.
const data = [
{
"id": 193,
"date": "2019-10-14 00:00:00",
},
{
"id": 194,
"date": "2019-10-15 00:00:00",
},
{
// @flow strict
_getMarkedDates = (color: string) => {
const correctedData: Array<calendarEntry> = this.state.correctedData
const startingWeek: number = getWeekNumber(new Date(correctedData[1].date))
const endingWeek: number = getWeekNumber(new Date(correctedData[correctedData.length - 1].date))
let arr = []
console.log('startingWeek:', startingWeek)
package bluebot;
import bluebot.commands.fun.*;
import bluebot.commands.fun.quickreactions.IDGFCommand;
import bluebot.commands.fun.quickreactions.KappaCommand;
import bluebot.commands.fun.quickreactions.NopeCommand;
import bluebot.commands.fun.quickreactions.WatCommand;
import bluebot.commands.misc.*;
import bluebot.commands.moderation.*;
import bluebot.commands.owner.AnnouncementCommand;
package bluebot.commands.misc;
import bluebot.MainBot;
import bluebot.utils.Command;
import bluebot.utils.soundUtils.AudioPlayerSendHandler;
import com.sedmelluq.discord.lavaplayer.player.AudioLoadResultHandler;
import com.sedmelluq.discord.lavaplayer.player.AudioPlayer;
import com.sedmelluq.discord.lavaplayer.tools.FriendlyException;
import com.sedmelluq.discord.lavaplayer.track.AudioPlaylist;
import com.sedmelluq.discord.lavaplayer.track.AudioTrack;