Skip to content

Instantly share code, notes, and snippets.

View jadbox's full-sized avatar

Jonathan Rose Dunlap jadbox

View GitHub Profile
@himanshuchawla009
himanshuchawla009 / web3auth.js
Last active April 11, 2022 04:13
Domain whitelisting for web3auth.
<!DOCTYPE html>
<html>
<head>
<title>Web3Auth Getting Started</title>
<meta charset="UTF-8" />
</head>
<body
style="
display: flex;
@kn100
kn100 / Dell xps 13 + non HiDPI display fixer
Created October 14, 2019 13:29
A script that forces your internal Dell XPS 13 4k display to run at 1600x900, so it runs at a similar DPI to your 2k monitor, thereby solving scaling issues.
#!/bin/sh
sleep 1
xrandr --newmode "1600x900" 118.25 1600 1696 1856 2112 900 903 908 934 -hsync +vsync
xrandr --addmode eDP-1 1600x900
xrandr --output DP-1 --auto --pos 0x0
xrandr --output eDP-1 --primary --mode 1600x900 --pos 2560x540
const {useCallback, useEffect, useReducer, useRef} = require('react');
let effectCapture = null;
exports.useReducerWithEmitEffect = function(reducer, initialArg, init) {
let updateCounter = useRef(0);
let wrappedReducer = useCallback(function(oldWrappedState, action) {
effectCapture = [];
try {
let newState = reducer(oldWrappedState.state, action.action);
#include <stdio.h>
#include <stdlib.h>
const int H = 40;
const int W = 80;
char map[H][W];
int rnd(int max) {
return rand() % max;

suspense-loader

Installation (sorry)

npm i THIS_URL

Usage

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 390.42 (builduser@anthraxx) Thu Mar 15 01:55:17 CET 2018
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
@jadbox
jadbox / auth.service.ts
Created July 13, 2018 20:55 — forked from 509dave16/auth.service.ts
Auth Service for Gun.js
import { gun } from './gun.service';
export const STATUS_SUCCESS = 'success';
export const STATUS_ERROR = 'error';
const ACTION_CREATE = 'create';
const ACTION_AUTH = 'auth';
const SESSION_KEY_USERNAME = 'rt_username';
const SESSION_KEY_PASSWORD = 'rt_password';
export interface Credentials {
username: string;
@509dave16
509dave16 / auth.service.ts
Created July 12, 2018 15:57
Auth Service for Gun.js
import { gun } from './gun.service';
export const STATUS_SUCCESS = 'success';
export const STATUS_ERROR = 'error';
const ACTION_CREATE = 'create';
const ACTION_AUTH = 'auth';
const SESSION_KEY_USERNAME = 'rt_username';
const SESSION_KEY_PASSWORD = 'rt_password';
export interface Credentials {
username: string;
@pveller
pveller / pubsub.js
Last active August 23, 2022 07:41
AWS Amplify PubSub with IoT and Cognito
/*
In order to subscribe to the AWS IoT topic over WS (over MQQT),
you have to make sure that your Cognito identity has a proper IoT policy attached to it.
More details and the message from the official AWS support:
https://github.com/aws/aws-amplify/issues/749
This code shows how you can dynamically attach a policy to the authenticated identity.
Make sure that your Authenticated IAM in the Cognito User Pool has proper IoT permissions.

Gaming District

The gaming district is a community of devs, modders, hackers, and gamers, competing and uniting to create and experience new games. A district0x and Finality Labs collaboration.

Purpose:

To imagine and practically implement immersive, expansive, and inclusive gaming experiences. To coordinate those that are most invested in the games they play and allow them to decide how it should be built and maintained.

Description:

Finality Labs is working on building a gaming district centered around the development of open gaming communities with governance and assets running on distributed ledgers. The gaming district will explore producing games that are themselves DAOs, districts, or sub-districts that give dedicated gamers the ability to decide how various aspects of game generation and maintenance take place. Projects may be easily forked and stake holders in game proposals may pull funding or support different visions of how a game should be built and maintained over time.