This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pikepdf | |
import os | |
folder_path = os.getcwd() # Current folder | |
layer_to_modify = "Cut" # Name of the layer to modify | |
for file in os.listdir(folder_path): | |
if file.endswith(".pdf"): | |
pdf_path = os.path.join(folder_path, file) | |
pdf = pikepdf.Pdf.open(pdf_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Xerox CC/WC C/M 118/ 123/ 128/ 133 (Mono)": { | |
"black": { | |
"006R01182": { | |
"region": "", | |
"m/s": "", | |
"type": "toner" | |
} | |
} | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//We're delivering it ourself, so.. | |
if($this->deliveryMethod == "hood") { | |
//Get VAT for delivery | |
$this->deliveryCostsVat = $this->getVat($this->deliveryCosts); | |
//Add delivery costs | |
$totalEditionCosts += $this->deliveryCosts; | |
//Bullshit variable, to fool the world |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"letters": { | |
"Brief 0 - 20 g": { | |
"max_grams": 20, | |
"max_dimensions_mm": [324,229], | |
"price": 0.96 | |
}, | |
"Brief 20 - 50 g": { | |
"max_grams": 50, | |
"max_dimensions_mm": [324,229], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Find houses from postcode, split by odd and even, simply order by geolocation | |
With help from Lukasz Szozda, https://stackoverflow.com/questions/59490951/query-to-split-even-and-odd-numbers-with-group-concat | |
*/ | |
$find_houses_from_postcodes_split_sql = " | |
SELECT street | |
,GROUP_CONCAT(DISTINCT CASE WHEN MOD(CAST(housenumber AS int),2) = 0 THEN CAST(housenumber AS int) END ORDER BY housenumber ASC) AS housenumbers_even |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//https://helgesverre.com/blog/fetch-info-from-soundcloud-api/ | |
$setting_ksart_user_id = 50; | |
$setting_ksart_creator_name = "cascosongs"; | |
$setting_soundcloud_user_name = "cascosongs"; | |
$setting_soundcloud_client_id = "MyeFEFZmDltbdw3XrgBZEUGlbDpDgV5p"; | |
// build our API URL | |
$url = "http://api.soundcloud.com/resolve.json?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('memory_limit', '-1'); | |
//http://0188353.student.wdka.nl/ | |
foreach(range (999999,111111,1) as $i) { | |
$s = str_pad($i, 7, "0", STR_PAD_LEFT); | |
$wget = "wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains wdka.nl --no-parent http://".$s.".student.wdka.nl/".PHP_EOL; | |
echo $wget.PHP_EOL; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$allowed_ip = ''; //https://watismijnip.nl/ | |
// Function to get the client ip address | |
function get_client_ip_env() { | |
$ipaddress = ''; | |
if (getenv('HTTP_CLIENT_IP')) | |
$ipaddress = getenv('HTTP_CLIENT_IP'); | |
else if(getenv('HTTP_X_FORWARDED_FOR')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all_handelsnamen = ''; | |
function get_handelsnamen() { | |
handelsnamen = ''; | |
$('h3.handelsnaamHeader > a').each(function(pl) { | |
handelsnamen += $( this ).html()+"\n"; | |
}); | |
//handelsnamen += "\n"; | |
return handelsnamen; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SRA3 size | |
var x = 320; | |
var y = 450; | |
function range(start, stop, step){ | |
var a=[start], b=start; | |
while(b<stop){b+=step;a.push(b)} | |
return a; | |
}; |
NewerOlder