Skip to content

Instantly share code, notes, and snippets.

View JakobTischler's full-sized avatar

Jakob Tischler JakobTischler

View GitHub Profile
@JakobTischler
JakobTischler / dabblet.css
Created December 19, 2011 17:16
Untitled
div { transition:all 0.5s; }
.container{width:200px;}
.box { opacity:0.666667; width: 200px; height: 200px; background: red; margin-bottom: 20px; cursor: pointer;}
.container:hover .box:hover {
opacity:1;
}
.container:hover .box:not(:hover) {
@JakobTischler
JakobTischler / dabblet.css
Created February 19, 2012 11:00
Merging String with Array
/**
* Merging String with Array
*/
;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="es-ES">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width">
<title>Toptaller Newsletter Especial &mdash; Horario verano</title>
<style type="text/css">
body {
background-color:#E9E9E9;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="es-ES">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width">
<title>Toptaller Newsletter Especial &mdash; Horario verano</title>
<style type="text/css">
body {
background-color:#E9E9E9;
@JakobTischler
JakobTischler / dabblet.css
Created October 9, 2012 12:09
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@JakobTischler
JakobTischler / drive.lua
Last active December 15, 2015 03:59
automatic closing/opening of covers
function courseplay:openCloseCover(self)
--courseplay:debug("self.cp.tipperHasCover = " .. tostring(self.cp.tipperHasCover), 3);
if self.cp.tipperHasCover then
for i=1, table.getn(self.cp.tippersWithCovers) do
local tIdx = self.cp.tippersWithCovers[i];
local tipper = self.tippers[tIdx];
--INFO: setPlane(true) = open / setPlane(false) = closed
if tipper.plane.bOpen ~= nil and (self.ai_mode == 1 or self.ai_mode == 2 or self.ai_mode == 5) then
--courseplay:debug(string.format("recordnumber=%s, maxnumber=%s, currentTipTrigger=%s, plane.bOpen=%s", tostring(self.recordnumber), tostring(self.maxnumber), tostring(self.currentTipTrigger ~= nil), tostring(tipper.plane.bOpen)), 3);
@JakobTischler
JakobTischler / CourseplayWaypointAttributes.txt
Last active December 30, 2015 01:59
Courseplay waypoint attributes
pos
[type: string]
[accepts: 'flt flt' (2D flt vector)]
[desc: position of the waypoint]
angle
[type: float]
[accepts: 'flt']
[desc: vector angle to next waypoint (in degrees) (bearing to the meridian)]
GIANTS Engine Runtime 5.0.1 (build date: Mar 28 2014)
Copyright (c) 2008-2012, GIANTS Software GmbH (www.giants-software.com), All Rights Reserved.
Copyright (c) 2003-2012, Christian Ammann and Stefan Geiger, All Rights Reserved.
Application: FarmingSimulator2013
Main System
Cpu Name: Intel(R) Core(TM) i7-4500U CPU @ 1.80GHz
Cpu Core(s): 4 @ 2.4 GHZ
OS: Windows NT 6.2 64-bit
Physics System
Driver: NVIDIA PhysX Runtime
@JakobTischler
JakobTischler / Bitwarden-Delete-Empty-Folders.js
Created August 11, 2021 09:00
In the Bitwarden Web Vault, goes through each folder, checks if it's empty, and deletes it if so. To be pasted and executed in the browser console.
var sleep = (ms = 1000) => {
return new Promise((resolve) => setTimeout(resolve, ms));
};
async function deleteEmptyFolders(startIndex = 0) {
const config = {
sleepBetweenFolder: 250,
sleepAfterLinkClick: 100,
sleepAfterEditClick: 500,
sleepAfterDeleteClick: 1200,
@JakobTischler
JakobTischler / get-int-parts.js
Last active August 11, 2021 09:50
Returns a list of numbers as fractions of the input number. Eg. 23 in 6 parts = [ 4, 4, 4, 4, 4, 3 ] (smooth) or [ 8, 3, 3, 3, 3, 3 ] (tight).
// Modes:
// "Smooth" spreads the number list so they are as close together as possible (+- 1). E.g. 23 in 6 parts = [ 4, 4, 4, 4, 4, 3 ]
// "Tight" has 1 number with a "rest" value, and the remaining numbers identical to each other. E.g. 23 in 6 parts = [ 8, 3, 3, 3, 3, 3 ]
const Mode = {
Smooth: 1,
Tight: 2,
};
function getIntParts(number, numParts, mode = Mode.Smooth) {
const val = number / numParts;