Skip to content

Instantly share code, notes, and snippets.

@Arty2
Arty2 / ktimatologio.js
Last active March 12, 2023 18:59
A technique to capture large screenshots from http://gis.ktimanet.gr/
/*
Instructions for Firefox:
1. On Firefox, open http://gis.ktimanet.gr/wms/ktbasemap/default.aspx and zoom to your area of interest
2. Hit Shift + F4 to open the Scratchpad and paste the code below, then click on “Run” (Ctrl + R).
You may close the Scratchpad. There’s no need to save anything.
3. Input your desired image size on the prompt window (height equals width)
4. Refine your position, eg: zoom with the scrollbar or pad by click and drag
5. Capture a screenshot of the full page with Firefox’s built-in tools: https://screenshots.firefox.com/
Also works in Chrome but there’s no built-in way to capture the screenshot.
@Arty2
Arty2 / acropolis_tiles.php
Created November 28, 2015 12:52
Strip tiles from http://acropolis-gis.ysma.gr/ (requires tweaking the code)
<?php
/*--------------------------------------------------------------
Gigapixel tile ripper for http://acropolis-gis.ysma.gr/
http://acropolis-gis.ysma.gr/sites/default/files/Walls/krpano.xml
http://acropolis-gis.ysma.gr/sites/default/files/katopsi/krpano.xml
uncomment a set to start ripping
@Arty2
Arty2 / delete_backups_executable.bat
Created November 29, 2015 17:36
Cleanup autogenerated backup files from architecture related software.
@echo off
setlocal
:PROMPT
SET /P CONFIRM=Do you want to delete all ^
Sketchup : .skb, AutoSave_, Backup*.layout ^
AutoCAD : .bak, .dwl, .dwl2, .log, .err ^
Photoshop : .tmp ^
@Arty2
Arty2 / generate_project_structure.bat
Created November 29, 2015 17:37
Generate directory structure for architecture related projects.
:: project_generate-structure
:: creates a directory structure for a new architectural competition
:: archi.tect.gr
@echo off
setlocal
:PROMPT
set project=XXX_PROJECT
set /p project= "Main directory name (current: %project%): "
If exist %project% choice /c yn /m "the directory %project% already exists, do you want to merge it?"
if ERRORLEVEL 2 exit
@Arty2
Arty2 / private-tabs.css
Last active June 7, 2018 09:58
Firefox CSS to colorize private tabs. Use with Stylish or userChrome.css
/*
private-tabs.css
https://gist.github.com/Arty2/4658f49ca815980b0cb2
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#main-window[privatebrowsingmode=temporary] #urlbar {
border-color: #841ebe !important;
background-color: #841ebe !important;
color: #fff !important;
@Arty2
Arty2 / speed-dial.css
Created December 20, 2015 20:07
Firefox CSS to style Speed Dials. Use with Stylish or userChrome.css
/*
speed-dial.css
use with Speed Dial plugin: https://addons.mozilla.org/en-US/firefox/addon/speed-dial
modified from: https://userstyles.org/users/254374
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url("chrome://speeddial/content/speeddial.xul"){
.sd-tab {
@Arty2
Arty2 / speed-dial_dev.css
Created December 27, 2015 19:33
Firefox CSS to style Speed Dials; Developer Edition. Use with Stylish or userChrome.css
/*
speed-dial_dev.css
use with Speed Dial plugin: https://addons.mozilla.org/en-US/firefox/addon/speed-dial
modified from: https://userstyles.org/users/254374
*/
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url("chrome://speeddial/content/speeddial.xul"){
.sd-tab {
@Arty2
Arty2 / knobs_to_serial.ino
Last active February 9, 2016 10:07
Arduino to Processing with Serial
int knob_0_pin = A0;
int knob_1_pin = A1;
int knob_2_pin = A2;
int knob_3_pin = A3;
int knob_4_pin = A4;
int knob_5_pin = A5;
void setup() {
Serial.begin(9600);
}
@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 / scrollbars.as.css
Last active May 24, 2024 06:06
Firefox CSS to style scrollbars to match Developer's theme. Use with userChrome.css
/*
scrollbars.as.css
based on https://userstyles.org/styles/128059/firefox-minimal-scrollbars
On Windows, save this file as: %APPDATA%\Mozilla\Firefox\Profiles ... /chrome/scrollbars.as.css
via: https://gist.github.com/Sporif/db6b3440fba0b1bcf5477afacf93f875
paste in userChrome.css in the /chrome folder mentioned above:
#PanelUI-menu-button {
-moz-binding: url(data:text/xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8IS0tIENvcHlyaWdodCAoYykgMjAxNyBIYWdnYWkgTnVjaGkNCkF2YWlsYWJsZSBmb3IgdXNlIHVuZGVyIHRoZSBNSVQgTGljZW5zZToNCmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUDQogLS0+DQoNCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPg0KPGJpbmRpbmdzIHhtbG5zPSJodHRwOi8vd3d3Lm1vemlsbGEub3JnL3hibCI+DQogICAgPGJpbmRpbmcgaWQ9ImpzIiBleHRlbmRzPSJjaHJvbWU6Ly9nbG9iYWwvY29udGVudC9iaW5kaW5ncy90b29sYmFyYnV0dG9uLnhtbCNtZW51Ij4NCiAgICAgICAgPGltcGxlbWVudGF0aW9uPg0KICAgICAgICAgICAgPGNvbnN0cnVjdG9yPjwhW0NEQVRBWw0KICAgICAgICAgICAgICAgIGlmKHdpbmRvdy51c2VyQ2hyb21lSnNNb2QpIHJldHVybjsNCiAg