Skip to content

Instantly share code, notes, and snippets.

@joelmo
joelmo / elementumplayer.json
Created June 2, 2022 15:17
elementum player
{
"name" : "Elementum",
"plugin" : "plugin.video.elementum",
"priority" : 200,
"play_movie" : [
"special://temp/elementum_library/Movies/%s",
{"dialog": "auto"}
],
"search_movie" : [
@joelmo
joelmo / css_js_html_mangle_class_id.js
Created June 12, 2021 08:14
Start to mangle class and ids across html js css.
import csstree from 'css-tree';
import csso from 'csso';
import htmlparse from 'node-html-parser';
import { transform } from "@swc/core";
import Visitor from "@swc/core/Visitor.js";
var cssAst = csso.syntax.parse('.test { color: #ff0000; } #foo { color: black; } .test {}');
var acceptChars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_';
<!-- j2cl jre -->
<dependency>
<groupId>com.vertispan.j2cl</groupId>
<artifactId>jre</artifactId>
<version>${j2cl.version}</version>
</dependency>
<dependency>
<groupId>com.vertispan.j2cl</groupId>
<artifactId>jre</artifactId>
<type>zip</type>
<ui:UiBinder
xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'
xmlns:sh='urn:import:client'>
<ui:style>
.pretty { background-color: Skyblue; }
</ui:style>
<g:SimplePanel>
<g:HTML>
#include <QtTest/QtTest>
//Q_DECLARE_METATYPE(QFileSystemWatcher)
class TestQSettings : public QObject {
Q_OBJECT
private slots:
void testWatcher();
};
#include <QtWidgets>
void hello() {
}
class MainWidget : public QTabWidget {
public:
static void showOptions() {
#include "nanogui/nanogui.h"
#include <iostream>
using namespace nanogui;
namespace nanogui {
class List : public Widget {
public:
List(Widget *parent) :
cannot open `/nix/store/446m83rpgms3zbxj9w97qhnnhcrdv5bx-xorg-server-1.18.4/share/X11/xkb/compiled/kdecache-joelmo': Permission denied at /nix/store/9g4wc31j7a2xp22xpgwr0qssfxahxdzl-builder.pl line 58.
builder for ‘/nix/store/hibzh65sv5ahj0dhxf0b9h6l1xay8z27-system-path.drv’ failed with exit code 13
cannot build derivation ‘/nix/store/2ps5kv8dz7p7jy22rbi9bhj3zpmbzxa4-nixos-system-jmdesk-17.03pre94121.210b3b3.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/2ps5kv8dz7p7jy22rbi9bhj3zpmbzxa4-nixos-system-jmdesk-17.03pre94121.210b3b3.drv’ failed
~/Documents/nixpkgs $ ls -l /nix/store/446m83rpgms3zbxj9w97qhnnhcrdv5bx-xorg-server-1.18.4/share/X11/xkb/compiled/kdecache-joelmo
total 10860
-rw-r--r-- 1 joelmo users 10547304 Oct 22 15:29 icon-cache.kcache
-rw-r--r-- 1 joelmo users 563349 Oct 26 03:52 ksycoca4
-rw-r--r-- 1 joelmo users 2254 Oct 26 03:52 ksycoca4stamp
~/Documents/nixpkgs $
(global-set-key (kbd "C-c C-f") 'my-find-file)
(defun my-find-file (&optional arg)
(interactive)
;; (if (projectile-mode) (projectile-find-file) (ido-find-file))
;; (if (bound-and-true-p projectile-mode) (projectile-find-file) (ido-find-file))
(if (equal nil projectile-project-root)
(ido-find-file)
(projectile-find-file)
)
(global-set-key (kbd "C-c C-f") 'my-find-file)
(defun my-find-file (&optional arg)
(if (projectile-mode) (projectile-find-file) (ido-find-file))
;; (if (bound-and-true-p projectile-mode) (projectile-find-file) (ido-find-file))
;; (if (equal nil projectile-project-root)
;; (ido-find-file)
;; (projectile-find-file)
)