This file contains 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
// Simulate the ExpressCart behaviour on ShoppingCart.aspx | |
const officeGuideConfig = ""; // https://github.com/Deltaco-AB/office-configurator-deltaco-config | |
const officeGuideElements = { | |
configurator: document.getElementById("officeGuide"), | |
wrapper: $(".msax-expresscart-view"), | |
button: $(".msax-CommandAddToCart")[0], | |
itemsInput: document.querySelectorAll(".msax-expresscart-items")[0] | |
} |
This file contains 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 time | |
from labylib import Cape | |
cookie = input("Paste your PHPSESSID here:\n") | |
vis = Cape.Visibility(cookie) | |
temp = Cape.Template(cookie) | |
i = False |
This file contains 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
#!/usr/bin/python3 | |
import sys, requests | |
# Usage: Pass URL to script, get back URL to Wayback Machine snapshot | |
base_url = 'http://web.archive.org' | |
try: | |
r = requests.get(f"{base_url}/save/{sys.argv[1]}") |
This file contains 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 random | |
def rand(): | |
dec = random.randint(0,255) | |
tohex = str(hex(dec).split("x")[-1]) | |
if(dec < 16): | |
tohex = "0" + tohex | |
return tohex |
This file contains 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
// Convert Akeneo Excel to AX Import | |
// <p> | |
function AXFORMAT_PARAGRAPH(input) { | |
function wrap(value) { | |
return `<p>${value}</p>`; | |
} | |
return Array.isArray(input) ? input.map(row => row.map(cell => { | |
if(!cell) { |
This file contains 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
.cga-palette { | |
/* low intensity */ | |
--black: #000000; | |
--blue: #0000AA; | |
--green: #00AA00; | |
--cyan: #00AAAA; | |
--red: #AA0000; | |
--magenta: #AA00AA; | |
--brown: #AA5500; | |
--light-gray: #AAAAAA; |
This file contains 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
# https://colab.research.google.com/drive/1TOeASp1DeDlkNxEqpgnK3Rf8_q495GD9?usp=sharing | |
# Craps is a dice game usually found at casinos. This python script tries to generate | |
# the largest possible sequence of psudo-random dice rolls before "sevening out". | |
# The world record is currently held by Patricia Demauro, with a score of 154. | |
import random | |
from functools import reduce | |
longest = 0 |
This file contains 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
// Hacky code to display a license box for the product SIGN-I09 on deltaco.se/deltaco.fi | |
window.addEventListener("AsyncAppReady",() => { | |
if(av && av.page == "lgt-121" && av.auth) { | |
const l = { | |
"se": [ | |
"ctl00_SPWebPartManager1_g_dbe96560_9460_4c5c_ad2f_ae3be3f25708_csr1_Itemtabs-1", | |
"<div style=\"display: flex;align-items: center;padding: 15px;background: #f1f1f1;border-radius: 6px;margin-bottom: 10px;\"><p style=\"margin: 0;margin-left: 5px;\">Vid köp behöver du ansöka om licensnycklar</p><a href=\"https://forms.office.com/Pages/ResponsePage.aspx?id=3IWmeTfPJkWZkKhVmPw6-NOVGN1I1iZGmkmpsV2rzkJUNkRCMTYwUDRDTjhIUEFYVlg0RU9MSDBJRiQlQCN0PWcu\" target=\"_blank\" style=\"display: contents;\"><img src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAAAoCAYAAAAsTRLGAAAGXklEQVR4nO2cfUyVVRzHv5iICZmkaSA5xasiim/hTXGiNF2C5mpay6yVaa3Ymmtu2ab1R8NN3Fp/tFmZzFm+bK3WkoTZWhosMTXREjBF8IUkTQJUFF+K9j2cc3nuvefe59G4INzz2Z7dc5+X+5zf73zP7/ye8zz3iYAP67HKd5UvPQDMADAXwBQALgCxAHrZHWi4a7gJ4G8AlQD2ASgAsAfAv8EqmI016HkbFnDflwG |
This file contains 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 | |
// Quick n' dirty script to import a CSV to MySQL | |
// -- BEGIN CONFIG -- | |
$file = ""; // Path to CSV file | |
$host = ""; | |
$user = ""; | |
$pass = ""; |
This file contains 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 json | |
# Create a Monkeydo-compatible JSON | |
def compile(tasks,name): | |
manifest = { | |
"tasks": tasks | |
} | |
with open(f"../still-alive/monkeydo_{name}.json","w") as f: | |
json.dump(manifest,f) |
OlderNewer