Skip to content

Instantly share code, notes, and snippets.

@bkrajendra
bkrajendra / cleanupUnusedWorkspaceInSlaves.groovy
Last active January 17, 2025 07:01 — forked from ceilfors/cleanupUnusedWorkspaceInSlaves.groovy
When you delete jobs in Jenkins, the corresponding workspaces in the build slaves won't be deleted automatically. This Jenkins script will go to each slave and check if the jobs are already deleted in Jenkins master and delete the workspace.
import com.cloudbees.hudson.plugins.folder.Folder
import hudson.FilePath
import jenkins.model.Jenkins
def boolean isFolder(String name) {
def item = Jenkins.instance.getItemByFullName(name)
return item instanceof Folder
}
def deleteUnusedWorkspace(FilePath root, String path, Boolean dryRun) {
@ij96
ij96 / program_attiny85_via_arduino.md
Created November 17, 2019 19:22
Instruction on how to program ATtiny85 via Arduino

How to: program ATtiny85 via Arduino

Configure Arduino as ISP

  • connect Arduino to the PC.
  • open Arduino IDE.
  • open the ArduinoISP example file (File > Examples > ArduinoISP).
  • note: if using Arduino Mega, modify the following lines from:
#define RESET 10
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML5 Canvas Rectangles</title>
<style>
body {
margin: 0;
display: flex;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Canvas Player Rotation</title>
<style>
body {
margin: 0;
overflow: hidden;
@Moyf
Moyf / LiteDatabase-en.js
Last active January 17, 2025 06:55
DVJS Code - Lite Database for Obsidian
const useList = false;
const curNote = dv.current();
if (!curNote){
dv.span("The current document is not loaded, please reopen it.");
return;
}
let tarFile = await app.vault.getAbstractFileByPath(curNote.file.path);
// Get the meta data of the current file
const curFileMeta = app.metadataCache.getFileCache(tarFile);
const headings = curFileMeta.headings;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML5 Canvas Rectangles</title>
<style>
body {
margin: 0;
display: flex;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML5 Canvas Rectangles</title>
<style>
body {
margin: 0;
display: flex;
@judge2020
judge2020 / README.md
Last active January 17, 2025 06:49
Download TikTok Favorites

Setup

  1. Sign into https://tiktok.com and go to your profile
  2. Click favorites or likes
  3. scroll down till all your videos load
  4. paste the script in console and run it
  5. Script will download the file containing newline-delimited links
  6. download via yt-dlp like so:

Setup Altserver Linux on Raspberry Pi with Wifi Refresh

This is a rough outline on how to setup altserver-linux on the 🍓🍰. Wifi refreshing is enabled through the use of netmuxd, which acts as a proxy from AltServer to the iDevice (replaces/enhances usbmuxd).

Tutorials used

Prerequisites

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HTML5 Canvas Rectangles</title>
<style>
body {
margin: 0;
display: flex;