Skip to content

Instantly share code, notes, and snippets.

Avatar
🛠️
Building Stuff

Allan Kimmer Jensen Saturate

🛠️
Building Stuff
View GitHub Profile
@Saturate
Saturate / rf-2019.schedule.json
Last active Jun 14, 2019
Roskilde Festival 2019 Schedule as JSON!
View rf-2019.schedule.json
[
{
"name": "SØN",
"country": "DK",
"time": "21:30",
"detailsLink": "https://www.roskilde-festival.dk/en/years/2019/acts/søn/",
"date": "2019-06-30T19:30:00.000Z",
"stage": "Rising",
"shortDescription": "Portrait of a young generation, painted with delicious guitar pop"
},
View gist:025f49b3ba717d55dfcd76def3f176ad
{
"name": "",
"version": "1.0.0",
"description": "",
"license": "UNLICENCED",
"author": "Allan",
"main": "index.js",
"private": true,
"scripts": {
"translations": "cross-env NODE_ENV=development extract-messages -l=en,da -o Components/Translations -d da --flat true \"Components/**/!(*.test).{ts,tsx}\""
View create-user-firebase.js
admin.auth().createUser({
uid: '203757', // should match the user id in the database, in the DB we store additional information.
email: 'allankimmerjensen@gmail.com',
emailVerified: false,
password: 'secretPassword',
displayName: 'Allan Kimmer Jensen',
photoURL: 'http://www.example.com/12345678/photo.png',
@Saturate
Saturate / action-keys.test.js
Created Mar 22, 2019
When you use redux, you might have an actions keys file, a common error is having two const export the same thing. This will test for that, and maybe make your coverage 100%!
View action-keys.test.js
import * as actionKeys from './action-keys';
describe('action keys', () => {
it('should have a unique string for each key', () => {
let uniq = Object.keys(actionKeys)
.map(objKey => {
return { count: 1, name: actionKeys[objKey] };
})
.reduce((a, b) => {
a[b.name] = (a[b.name] || 0) + b.count;
@Saturate
Saturate / mock.date.now.js
Last active Mar 18, 2019
Mocking Date.prototype.toLocaleString with Jest, as it's not working in jsdom
View mock.date.now.js
Date.now = jest.fn(() => 1482363367071);
@Saturate
Saturate / apis.txt
Last active Jan 7, 2019
poe.ninja API URI's
View apis.txt
https://poe.ninja/api/Data/GetFragmentOverview?league=Betrayal
https://poe.ninja/api/Data/GetCurrencyOverview?league=Betrayal
@Saturate
Saturate / day-1.js
Last active Dec 3, 2018
Advent Of Code 2018
View day-1.js
(function(){
// Load the data from the page
const data = document.body.innerText.split('\n');
// Do the calculations!
let answer = data.reduce((total, feqChange) => total + Number(feqChange), 0);
// Tell us cool stories, bro!
console.log(`Answer is: ${answer}, copied to clipboard!`);
copy(answer);
@Saturate
Saturate / a-autoexec-for-csgo.md
Last active Feb 22, 2019
Counter Strike Global Offensive - autoexec cfg file
View a-autoexec-for-csgo.md

autoexec.cfg

Opinionated settings and commands for Counter-Strike Global Offensive. You might want to change some of these to your preferences and equipment.

Install

Create or edit the file under:

%steamLibrary%\steamapps\common\Counter-Strike Global Offensive\csgo\cfg\autoexec.cfg

Ex. C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\autoexec.cfg

@Saturate
Saturate / docker-compose.reverse-proxy.yml
Created Apr 5, 2018
Træfik + Let's Encrypt + more?
View docker-compose.reverse-proxy.yml
version: '3'
services:
reverse-proxy:
image: traefik #The official Traefik docker image
command: --api --docker #Enables the web UI and tells Træfik to listen to docker
restart: always
networks:
- web
ports:
You can’t perform that action at this time.