Skip to content

Instantly share code, notes, and snippets.

@Arty2
Arty2 / objkt-capture-frames.js
Last active May 30, 2021 18:09
Browser console script to render frames from a rotating OBJKT on hicetnunc.xyz and save as PNGs
/*
objkt-capture-frames.js
Description: Browser console script to render frames from a rotating OBJKT on hicetnunc.xyz and save as PNGs
Version: 0.2
Author: Heracles Papatheodorou / @Arty2
Website: https://gist.github.com/Arty2/cc438cc516bfc443cf4f7756343188bc
License: MIT License
*/
// styles for the new elements
@Arty2
Arty2 / jpg-to-page-bundle.bat
Last active December 27, 2020 20:56
Loop through every .jpg file in the same directory and make a Hugo page bundle out of each.
@echo OFF
rem loop through all JPG files
for %%f IN (*.jpg) DO (
rem make a new directory with the same filename
mkdir %%~nf
rem move file the new directory
move %%f %%~nf/%%f
rem go inside the new directory
cd %%~nf
@Arty2
Arty2 / jquery.draggable.js
Last active November 26, 2020 12:28
jQuery plugin to make elements draggable without jQuery UI. Usage: view source on http://jqueryui.com/draggable/
/*--------------------------------------------------------------
Draggable
alternative to jQuery UI’s draggable
based on comments from: http://css-tricks.com/snippets/jquery/draggable-without-jquery-ui/
usage example: $('.post-thumbnail, article header').draggable();
--------------------------------------------------------------*/
(function($) {
if (!jQuery().draggable) {
$.fn.draggable = function() {
this
@Arty2
Arty2 / rotary_encoder.pde
Created February 22, 2016 03:00
Reading one Rotary Encoder from a Raspberry Pi with Processing 3
/*
Reading one Rotary Encoder from a Raspberry Pi
Translated from C to Processing by Heracles Papatheodorou
via http://theatticlight.net/posts/Reading-a-Rotary-Encoder-from-a-Raspberry-Pi/
GND MIDDLE encoder leg
GPIO22 GPIO23 LEFT and RIGHT legs
3.3V LEFT and RIGHT, splits to two 10k resistors for pull-up
@Arty2
Arty2 / logitech-craft.ahk
Created May 23, 2020 16:50
Hide popup for Logitech Craft's crown.
; make Logitech craft windows transparent, restart the script and use the crown to hide it
; see https://github.com/Logitech/logi_craft_sdk/issues/31
; ← everything after this character is a comment
SetTimer, LogiOverlay, -5000 ; this timer runs once, after 5 seconds
LogiOverlay(){
If WinExist("ahk_EXE LogiOverlay.exe") {
WinClose, ahk_EXE LogiOverlay.exe ; close the window, comment to disable
; WinSet, Transparent, 20, ahk_EXE LogiOverlay.exe ; uncomment this line to change its opacity instead
}
@Arty2
Arty2 / custom-accent.css
Last active April 7, 2020 16:04
Firefox CSS to change the accent color on top of tabs. Use with userChrome.css
/*
1. Navigate to `%APPDATA%\Mozilla\Firefox\Profiles ...` or locate the exact directory at `about:profiles`
2. Create a folder named `chrome` then create a file named userChrome.css inside it and paste this code
3. If userChrome.css doesn’t seem to work, open `about:config` and set `toolkit.legacyUserProfileCustomizations.stylesheets=true`
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
.tab-line[selected="true"] {
background-color : #841ebe;
@Arty2
Arty2 / dropbox-paper-focus.css
Created April 6, 2020 07:54
dropbox-paper-focus.css
/*
A set of styles that turns the sideba and menus partialy transparent when the cursor is not over them.
Includes some stylistic changes over the display of text, eg. — instead of bullet points, Anonymous Pro font (if exists on the system).
*/
::-moz-selection { background: #000; }
::selection { background: #000; }
/*---------
@Arty2
Arty2 / dropbox-paper-dark.css
Last active April 6, 2020 07:50
User Style for Dropbox Paper that introduces a simple Dark theme. To be used with Stylus or similar extention.
/*
Obsolete since Dropbox Paper introduced a native Dark theme.
*/
::-moz-selection { background: #000; }
::selection { background: #000; }
body,
.ace-editor,
.hp-sidebar-container,
@Arty2
Arty2 / thin-scrollbars.css
Last active September 10, 2019 20:26
User Style for Firefox that replaces all scrollbards with their thin equivalent. To be used with Stylus or similar extention.
* {
scrollbar-color: rebeccapurple transparent; /* ← use a color that matches your Firefox of Windows 10 color-scheme */
scrollbar-width: thin;
}
@Arty2
Arty2 / simplenote-dark-theme.css
Last active April 11, 2019 12:12
User Style for app.simplenote.com that introduces a Dark theme and other visual tweaks. To be used with Stylus or similar extention
::-moz-selection { background: #000; }
::selection { background: #000; }
:not(.published-wrap) > .wrapper > .app {
background: #222;
}
.wrapper {
height: 100vh;
}