This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/fish | |
set current (gdbus introspect --session --dest org.gnome.Shell --object-path /me/madhead/Shyriiwook --only-properties | grep currentLayout | string match -g -r ".*= '([a-z+]+)'") | |
# echo "Current kbd: $current" | |
if test $current = "us+symbolic" | |
gdbus call --session --dest org.gnome.Shell --object-path /me/madhead/Shyriiwook --method me.madhead.Shyriiwook.activate 'ua' | |
else if test $current = "ua" | |
gdbus call --session --dest org.gnome.Shell --object-path /me/madhead/Shyriiwook --method me.madhead.Shyriiwook.activate 'us+symbolic' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Also requires DNS setup for domain: | |
TXT | |
_mailchannels | |
v=mc1 cfid=<YOUR_WORKER_DOMAIN_IN_CLOUDFLARE>.workers.dev | |
Also DKIM: | |
https://developers.cloudflare.com/pages/platform/functions/plugins/mailchannels/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Surreal from "https://deno.land/x/surrealdb@v0.2.1/mod.ts" | |
const db = new Surreal('http://localhost:8000/rpc') | |
await db.signin({ user: 'root', pass: 'root' }) | |
await db.use('test', 'test') | |
console.log("Fetching #1") | |
console.log(await db.query(`select * from posts`)) | |
console.log("Fetching #2") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** @jsx h */ | |
import { h, json, jsx, serve } from "https://deno.land/x/sift@0.5.0/mod.ts"; | |
import { ssr } from "https://crux.land/nanossr@0.0.5"; | |
const App = () => ( | |
<div> | |
<h1>Hello world!</h1> | |
</div> | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Dependency: https://github.com/jtidy/jtidy | |
import org.w3c.tidy.Tidy | |
import space.dector.glow.engine.HtmlWebPageContent | |
import java.io.StringWriter | |
fun HtmlWebPageContent.prettyPrint(): HtmlWebPageContent { | |
val tidy = Tidy().apply { | |
quiet() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(Function.prototype.name===undefined&&Object.defineProperty!==undefined){Object.defineProperty(Function.prototype,"name",{get:function(){var regex=/function\s([^(]{1,})\(/,match=regex.exec(this.toString());return match&&match.length>1?match[1].trim():""}})}if(String.prototype.trimRight===undefined){String.prototype.trimRight=function(){return String(this).replace(/\s+$/,"")}}var stylus=function(){function require(p){var path=require.resolve(p),mod=require.modules[path];if(!mod)throw new Error('failed to require "'+p+'"');if(!mod.exports){mod.exports={};mod.call(mod.exports,mod,mod.exports,require.relative(path))}return mod.exports}var bifs="called-from = ()\n\nvendors = moz webkit o ms official\n\n// stringify the given arg\n\n-string(arg)\n type(arg) + ' ' + arg\n\n// require a color\n\nrequire-color(color)\n unless color is a 'color'\n error('RGB or HSL value expected, got a ' + -string(color))\n\n// require a unit\n\nrequire-unit(n)\n unless n is a 'unit'\n error('unit expected, got a ' + -strin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: dev | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
build: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* :: punched_card :: (ported to p5js) | |
* | |
* Try it online: | |
* https://editor.p5js.org/dector/sketches/mDzY1uL-s | |
* | |
* https://gist.github.com/dector/e3891c91230963c3cb347b7b6a64c0cd | |
*/ | |
SCALE = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.github.dector.tools | |
import android.util.Log | |
import java.lang.ref.WeakReference | |
/** | |
* Usage example: `class Foo : HeavyObject by HeavyObject.new() {`. | |
*/ | |
interface HeavyObject { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@-moz-document domain("youtube.com") { | |
#video-title { | |
max-height: none !important; | |
} | |
} |
NewerOlder