Skip to content

Instantly share code, notes, and snippets.

View PsychoLlama's full-sized avatar
The future is federated

Jesse Gibson PsychoLlama

The future is federated
View GitHub Profile
@PsychoLlama
PsychoLlama / main.js
Created March 3, 2023 00:08
Electron Overlay Duplicate Dock Icon Repro
const { app, BrowserWindow } = require("electron");
async function createWindow() {
const win = new BrowserWindow({
width: 600,
height: 400,
});
win.setVisibleOnAllWorkspaces(true, {
// Transforms process type to `UIElementApplication`.
@PsychoLlama
PsychoLlama / export-flow-types.sh
Created January 24, 2018 22:36
Export flow type definitions (just bash)
#!/usr/bin/env bash
set -e
# Assumes source files are in the src/ directory
find src -type f | while read filename; do
# Ignore these directories (like __tests__ or __stories__)
if [[ "$filename" =~ __[a-zA-Z]+__ ]]; then
continue
fi
{
"name": "panic-stuff",
"version": "1.0.0",
"description": "",
"main": ".eslintrc.js",
"dependencies": {
"gun": "^0.3.993",
"panic-server": "^0.3.0"
},
"devDependencies": {},
@PsychoLlama
PsychoLlama / inject_local_vars.js
Last active September 13, 2016 18:53
Injecting local variables into functions (for people with zero moral boundaries)
Function.prototype.with = function () {
// No local variables are defined to prevent scope pollution,
// cuz `eval` can see 'em.
// `with` turns object properties into local variables.
with (arguments[0] || {}) {
// Turn the function into a string, then eval it as an expression.
return eval(`(${String(this)})`).call(
// Invoke it and apply the `this` and `arguments` params.
@PsychoLlama
PsychoLlama / gun-level-windows.js
Created August 25, 2016 20:48
Using gun-level with SQLite3 on Windows
'use strict';
/*
Really this is the server.js file, but due to
gist limitations, the first filename has to
be the description.
*/
const Gun = require('gun-level');
@PsychoLlama
PsychoLlama / index.html
Created June 2, 2016 21:25
Load testing gun using panic
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Panic load testing</title>
</head>
<body>
<script src='panic.js'></script>
<script src='gun.js'></script>
<script>
@PsychoLlama
PsychoLlama / lol.js
Created June 2, 2016 20:33
I apologize in advance
universe: {
let x = Number(4)
x / 0
break universe
// brimstone
}
process.exit(0xAAAAAAAAA)
@PsychoLlama
PsychoLlama / deps.json
Created June 1, 2016 18:18
GunDB catastrophic fault-tolerance test case
{
"dependencies": {
"mocha": "^2.5.3",
"panic-server": "^0.3.0",
"selenium-webdriver": "^2.53.2"
}
}
@PsychoLlama
PsychoLlama / index.html
Created March 12, 2016 05:11
IndexedDB with gun-level
<!DOCTYPE html>
<html>
<head>
<title>IndexedDB Stuff</title>
<meta charset="utf-8">
</head>
<body>
<h1>IndexedDB through gunDB</h1>
<script src="bundle.js"></script>
@PsychoLlama
PsychoLlama / Dribbble Knockoff (Shadman Ahmed).markdown
Created June 21, 2015 06:17
Dribbble Knockoff (Shadman Ahmed)

Dribbble Knockoff (Shadman Ahmed)

This is a recreational design project that was inspired by Shadman Ahmed's Dribbble post (https://dribbble.com/shots/1885965-Card-Freebie). He uploaded it as a .jpg and I built it in HTML & CSS.

Disclaimer: I do not claim ownership to this design nor do I own the image of the "Pomme Tatin au Sirop d'Erable" (I also have no idea what that means in English). This project was just done for fun.

A Pen by Jesse Gibson on CodePen.

License.