Skip to content

Instantly share code, notes, and snippets.

View danpaldev's full-sized avatar

Daniel danpaldev

View GitHub Profile
@chipjarred
chipjarred / SwiftUIKeyDetection.swift
Last active June 2, 2023 18:52
Detecting keyboard state in SwiftUI
import SwiftUI
extension CGKeyCode
{
// Define whatever key codes you want to detect here
static let kVK_Space: CGKeyCode = 0x31
var isPressed: Bool {
CGEventSource.keyState(.combinedSessionState, key: self)
}
@berkorbay
berkorbay / github_desktop_ubuntu.md
Last active June 24, 2024 00:44
To install Github Desktop for Ubuntu

IMPORTANT

See the following links for further updates to Github Desktop for Ubuntu. These are official instructions. (also mentioned by fetwar on Nov 3, 2023)

For the sake of "maintaining the tradition" here is the updated version.

public class DoublyLinkedList {
private int size = 0;
private Node last, first;
public void addLast(Node node) {
if (first == null) {
first = node;
last = first;
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active June 27, 2024 19:37
crack activate Office on mac with license file
@jahe
jahe / jpa-cheatsheet.java
Last active June 12, 2024 15:11
JPA Cheatsheet
/*
JPA (Java Persistence API)
Transaction Management with an Entity-Mananger:
---
entityManager.getTransaction().begin();
entityManager.persist(<some-entity>);
entityManager.getTransaction().commit();
entityManager.clear();