Skip to content

Instantly share code, notes, and snippets.

View vampirefan's full-sized avatar
😁
Happy Coding

Fan vampirefan

😁
Happy Coding
View GitHub Profile
@vampirefan
vampirefan / custom.css
Created November 17, 2022 00:27 — forked from solarkraft/custom.css
Logseq custom.css for publishing
/*** Publishing: Hide things that aren't very useful for a read-only view */
/** Hide page properties (public pages will always have public: true) */
.content .pre-block { display: none; }
/** Title */
/* Make title non-editable */
#main-container .page-title { pointer-events: none; }
/** Hide useless sidebar stuff */
- This page is a collection of some of the Advanced queries from the [[Datalog]] channel on the [[Logseq/Discord]] server. #datalog
id:: 61db13f4-75e8-4f87-ad60-3ac3479c5fc8
- ### Resources
- [link: The first message on the datalog channel](https://discord.com/channels/725182569297215569/743139225746145311/743139795865174119)
- [link: Logseq docs - Advanced queries](https://docs.logseq.com/#/page/advanced%20queries)
- [link: Logseq datascript schema](https://gist.github.com/tiensonqin/9a40575827f8f63eec54432443ecb929)
- [link: Logseq frontend db model](https://github.com/logseq/logseq/blob/master/src/main/frontend/db/model.cljs)
- [link: How to Graph Your Data - talk by Paula Gearon](https://youtu.be/tbVwmFBnfo4)
- [link: Domain modelling with datalog - talk by Norbert Wojtowicz](https://youtu.be/oo-7mN9WXTw)
- [link: Athens Research ClojureFam](https://github.com/athensresearch/ClojureFam)
@vampirefan
vampirefan / click.cs
Last active December 21, 2015 10:29
wpf中触发html中的onclick()
private void ButtonItemSpecificsContinue_Click(object sender, RoutedEventArgs e)
{
// to do
// attach ButtonItemSpecificsContinue_Click to the post submit action!
WebBrowser.Document.GetElementById("btSubmit1").InvokeMember("Click");
}
@vampirefan
vampirefan / cleanMacOSOpenWith
Created May 27, 2013 10:54
clean Macos Multiple open with
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
@vampirefan
vampirefan / keydown_nav_url.js
Last active October 11, 2015 19:08
JavaScript: keydown make url jump.
<script type="text/javascript">
document.addEventListener("keydown", function ( event ) {
if ( event.keyCode === 9 || ( event.keyCode >= 32 && event.keyCode <= 34 ) || (event.keyCode >= 37 && event.keyCode <= 40) ) {
event.preventDefault();
}
}, false);
document.addEventListener("keyup", function ( event ) {
if ( event.keyCode === 9 || ( event.keyCode >= 32 && event.keyCode <= 34 ) || (event.keyCode >= 37 && event.keyCode <= 40) ) {
switch( event.keyCode ) {
@vampirefan
vampirefan / navigation.js
Created October 10, 2012 06:51 — forked from pala/navigation.js
jQuery: keyboard navigation
$(function(){
$(document).keydown(function(e) {
var url = false;
if (e.which == 37 || e.which == 74) { // Left arrow and J
{% if page.previous %}
url = '{{page.previous.url}}';
{% endif %}
}
else if (e.which == 39 || e.which == 75) { // Right arrow and K
{% if page.next %}