Skip to content

Instantly share code, notes, and snippets.

View buhrmi's full-sized avatar

Stefan Buhrmester buhrmi

View GitHub Profile
@buhrmi
buhrmi / bun-plugin-svelte.js
Created March 28, 2024 08:20
bun-plugin-svelte
import { plugin } from "bun";
import { compile } from "svelte/compiler";
plugin({
name: "svelte-loader",
setup(build) {
const emittedCSS = {};
build.module('svelte-plugin', async () => {
return {
full
http://www.no3-schinkelplatz.com/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhlVFJ1TkRGMU1qRnhZMlpvZW1GNmVXdDRlbUpsYldWM01HTnlhd1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpV1dsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5SdmQyNW9iM1Z6WlMxdmJtVXRZbUYwYURJdWFuQm5JanNnWm1sc1pXNWhiV1VxUFZWVVJpMDRKeWQwYjNkdWFHOTFjMlV0YjI1bExXSmhkR2d5TG1wd1p3WTdCbFE2RVdOdmJuUmxiblJmZEhsd1pVa2lEMmx0WVdkbEwycHdaV2NHT3daVU9oRnpaWEoyYVdObFgyNWhiV1U2Q214dlkyRnMiLCJleHAiOm51bGwsInB1ciI6ImJsb2Jfa2V5In19--c67007dbfec0e353c9caefcb1e6ba9f117a1f913/townhouse-one-bath2.jpg
preview
http://www.no3-schinkelplatz.com/rails/active_storage/disk/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdDVG9JYTJWNVNTSWhNVEo1YzNCamFIRXhiM2hpTXpWbVl6aDViWGQ2ZDJsaGNEbHBid1k2QmtWVU9oQmthWE53YjNOcGRHbHZia2tpV1dsdWJHbHVaVHNnWm1sc1pXNWhiV1U5SW5SdmQyNW9iM1Z6WlMxdmJtVXRZbUYwYURJdWFuQm5JanNnWm1sc1pXNWhiV1VxUFZWVVJpMDRKeWQwYjNkdWFHOTFjMlV0YjI1bExXSmhkR2d5TG1wd1p3WTdCbFE2RVdOdmJuUmxiblJmZEhsd1pVa2lEMmx0WVdkbEwycHdaV2NHT3daVU9oRnpaWEoyYVdObFgyNWhiV1U2Q214dlkyRnMiLCJleHAiO
@buhrmi
buhrmi / bootstrap.sh
Last active June 19, 2023 04:24
Minipaas (Docker + Portainer + Caddy-Proxy)
# install docker
sudo apt-get update
sudo mkdir -m 0755 -p /etc/apt/keyrings
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install apparmor docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# bootstrap minipaas
mkdir minipaas
@buhrmi
buhrmi / ERC721Tradable.sol
Created November 22, 2020 08:17
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.17+commit.d19bba13.js&optimize=false&runs=200&gist=
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC721/ERC721Full.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/ownership/Ownable.sol";
import "./Strings.sol";
contract OwnableDelegateProxy {}
contract Pricer {
function price(uint256 streamerID) public view returns (uint256) {
@buhrmi
buhrmi / crossfade.js
Last active January 28, 2020 00:44
d3-powered crossfade for svelte
import { interpolateTransformCss as interpolate} from 'd3'
import { cubicOut } from 'svelte/easing'
export function crossfade({ fallback, ...defaults }) {
const to_receive = new Map();
const to_send = new Map();
function crossfade(fromNode, toNode, params) {
const { delay = 0, duration = d => Math.sqrt(d) * 30, easing = cubicOut } = Object.assign(Object.assign({}, defaults), params);
const toStyle = getComputedStyle(toNode);
const fromStyle = getComputedStyle(fromNode);
toNode.style.transform = 'none'
// On each page load, any element with a [data-svelte] attribute gets injected with
// the component defined in this attribute. Eg `data-svelte="poker"` will load the
// `poker.svelte` component into that element.
const req = require.context('../', true, /\.(svelte)$/i);
const components = {}
req.keys().map(key => {
const name = key.match(/\w+/)[0];
components[name] = req(key).default || req(key)
});
@buhrmi
buhrmi / index.html
Last active October 30, 2018 08:20
shitcoin maker
<div id="app">
<pre>
pragma solidity ^0.4.24;
/**
* Thank you for checking out {{ name }}.
* We hope you have an amazing day.
*/
// File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol
@buhrmi
buhrmi / actioncable-vue.js
Last active October 29, 2018 09:45
Vue ActionCable
// Make a vue component automatically subscribe to a cable and unsubscribe when it's destroyed
// You can use reactive vue state as params. the subscription will be re-established when the param changes.
// Usage //
// new Vue
// data: ->
// something: null
// subscriptions:
// SomeChannel:
// params: ->
0xfc1B532F8ED8Ad01512eF71c588763E5A0CaBc02

Keybase proof

I hereby claim:

  • I am buhrmi on github.
  • I am buhrmi (https://keybase.io/buhrmi) on keybase.
  • I have a public key whose fingerprint is 590E 0550 A897 8490 8834 77C6 524F 17C7 B8C0 E435

To claim this, I am signing this object: