Skip to content

Instantly share code, notes, and snippets.

View kinsleykajiva's full-sized avatar
🏠
Working from home

Kinsley Kajiva kinsleykajiva

🏠
Working from home
  • Africa
  • 12:19 (UTC +02:00)
View GitHub Profile
@toddsby
toddsby / backup.php
Last active December 30, 2021 06:01 — forked from menzerath/backup.php
backup.php
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* (c) 2012-2014: Marvin Menzerath - http://menzerath.eu
* contribution: Drew Toddsby
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit','1024M');
@jewelsea
jewelsea / JavaFXTrayIconSample.java
Last active September 21, 2025 14:40
Demonstrate using the System Tray (AWT) to control a JavaFX application.
import javafx.application.*;
import javafx.geometry.Pos;
import javafx.scene.*;
import javafx.scene.control.Label;
import javafx.scene.layout.*;
import javafx.scene.paint.Color;
import javafx.stage.*;
import javax.imageio.ImageIO;
import java.io.IOException;
@ComFreek
ComFreek / BufferedImageTranscoder.java
Last active October 8, 2024 02:40
JavaFX & Batik SVG Renderer: Minimal example
/**
* This is a compilation of code snippets required to render SVG files in JavaFX using Batik.
* See my full post on StackOverflow: http://stackoverflow.com/a/23894292/603003
*/
package proofofconcept;
import java.awt.image.BufferedImage;
import org.apache.batik.transcoder.TranscoderException;
import org.apache.batik.transcoder.TranscoderOutput;
@bugabinga
bugabinga / AnimateNodeIn.java
Created March 16, 2014 00:53
JavaFX-Sample of how to animate Node in and out of Scene.
package application;
import java.util.function.Supplier;
import javafx.animation.Animation;
import javafx.animation.FadeTransition;
import javafx.animation.Interpolator;
import javafx.animation.RotateTransition;
import javafx.animation.ScaleTransition;
import javafx.application.Application;
@ijy
ijy / sublime-text-3-setup.md
Last active March 7, 2025 20:44
My Sublime Text 3 setup.

Sublime Text 3 Setup

Install Package Control

Install Package Control for easy package management.

  1. Open the console with Ctrl+`
  2. Paste in the following:
@rnorth
rnorth / gist:7019921
Created October 17, 2013 06:23
Quick example of using Quasar channels. Must run using the Quasar JVM agent. https://github.com/puniverse/quasar/ Example output: 'Hello 1' -> 'Hello 2' -> 'Hello 3' -> 'Hello 4' -> 'Hello 5' -> 'Hello 6' -> 'Hello 7' -> 'Hello 8' -> -> 'Hello 1' 'Hello 9' -> -> 'Hello 2' 'Hello 10' -> -> 'Hello 3' 'Hello 11' -> -> 'Hello 4' 'Hello 12' -> -> 'He…
import co.paralleluniverse.fibers.Fiber;
import co.paralleluniverse.fibers.SuspendExecution;
import co.paralleluniverse.strands.SuspendableRunnable;
import co.paralleluniverse.strands.channels.Channel;
import co.paralleluniverse.strands.channels.Channels;
import jsr166e.ForkJoinPool;
import java.util.concurrent.ExecutionException;
import static java.lang.String.format;
@psdtohtml5
psdtohtml5 / snippet.js
Created August 12, 2013 21:39
JavaScript : Scroll and Focus to Element (input)
var cursorFocus = function(elem) {
var x = window.scrollX, y = window.scrollY;
window.scrollTo(x, y);
elem.focus();
}
cursorFocus(document.getelementbyId('search-terms'));
@jewelsea
jewelsea / MyApplicationClass.java
Last active March 30, 2022 03:47
JavaFX TreeView item dynamic loading demo with FXML.
import javafx.animation.*;
import javafx.application.Application;
import javafx.event.*;
import javafx.fxml.FXMLLoader;
import javafx.scene.*;
import javafx.scene.image.Image;
import javafx.scene.input.MouseEvent;
import javafx.stage.*;
import javafx.util.Duration;
@mindplay-dk
mindplay-dk / README.md
Last active September 3, 2024 11:39
ISO 3166-2 Country and State/Region Tables for MySQL
@menzerath
menzerath / backup.php
Last active February 18, 2024 19:33
PHP: Recursively Backup Files & Folders to ZIP-File
<?php
/*
* PHP: Recursively Backup Files & Folders to ZIP-File
* MIT-License - 2012-2018 Marvin Menzerath
*/
// Make sure the script can handle large folders/files
ini_set('max_execution_time', 600);
ini_set('memory_limit', '1024M');