Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / bing_tiles.html
Created November 12, 2015 12:43
Strip bird's view tiles from Bing maps (requires tweaking the code)
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
var tile_w = 256;
var tile_h = 256;
@Arty2
Arty2 / acropolis_tiles.html
Created November 12, 2015 12:42
Strip tiles from http://acropolis-gis.ysma.gr/ (requires tweaking the code)
<!DOCTYPE HTML>
<html>
<head>
<meta charset='utf-8'>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
/*
@Arty2
Arty2 / toggle_endpoints.rb
Created November 12, 2015 12:41
SketchUp plugin — Provides a function to toggle EndPoints on/off
# Name : Toggle EndPoints
# Description : Provides a function to toggle EndPoints on/off
# Author : Heracles Papatheodorou
# Usage : Tools → Toggle EnPoints (hint: assign to keyboard shortcut)
# Date : 27.Jul.2004
# Type : tool
# History:
# 1.0 (2013.04.07) - Initial version.
require 'sketchup.rb'
@Arty2
Arty2 / copypasta.js
Created October 31, 2015 10:25
Copy & paste hijacking for forcing credit with "Read more" and URL. Antilogue: http://daringfireball.net/2010/05/tynt_copy_paste_jerks
/*
copy & paste hijacking for forcing credit with "Read more" and URL
antilogue: http://daringfireball.net/2010/05/tynt_copy_paste_jerks
*/
function copypasta() {
var body_element = document.body;
var pagelink = ' Read more: '+window.location.href.split('#')[0]+'';
if (window.getSelection) {
var selection = window.getSelection();
var copytext = selection.toString().replace(/\n/g, '<br />') + '<br /><br /><br />' + pagelink;
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from email.header import Header
from email.mime.text import MIMEText
from getpass import getpass
from smtplib import SMTP_SSL
import sys
#edit the line below
@Arty2
Arty2 / tabs_to_bottom.css
Last active November 5, 2023 19:58
Firefox CSS to move tabs and adress bar to bottom of window. Use with userChrome.css (works with Firefox 71+)
This script has moved to https://github.com/Arty2/userstyles