Skip to content

Instantly share code, notes, and snippets.

@anongit
anongit / 0001-Add-customizable-display-s-contents-margins.15.08.patch
Last active August 29, 2015 14:22
Patches for Konsole 2.14.2 (KDE 4.14.2) and 15.08.0 (KF 5.12.0) to add customizable margins. Original patch: https://git.reviewboard.kde.org/r/109891/
From ee719ac4af813f1474c2c215a1c01a0f517c2011 Mon Sep 17 00:00:00 2001
From: anongit <anongit@users.noreply.github.com>
Date: Mon, 3 Aug 2015 20:46:53 +0500
Subject: [PATCH] Add customizable display's contents margins
---
src/EditProfileDialog.cpp | 10 +++++++++
src/EditProfileDialog.h | 1 +
src/EditProfileDialog.ui | 57 ++++++++++++++++++++++++++++++++---------------
src/Profile.cpp | 2 ++
@anongit
anongit / index.html
Created January 17, 2017 15:43 — forked from syntagmatic/index.html
Nutrient Parallel Coordinates
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Nutrient Database Explorer</title>
<link rel="stylesheet" type="text/css" href="parallel.css" />
</head>
<body>
<div id="header">
<h1>Nutrient Explorer</h1>
/*
Execute script using the interpreter:
$ swift appnap.swift "Skype"
or compile it first then run:
$ swiftc -O appnap.swift
$ ./appnap "(?i)skype" # (?i) — ignore case
*/
import AppKit
@anongit
anongit / run.swift
Created October 2, 2018 06:36
Hello world GUI window application, updated to Swift 4 from: http://www.rockhoppertech.com/blog/swift-script-to-create-a-cocoa-window/
#!/usr/bin/env swift
import Cocoa
// due to the new constraint syntax
@available(OSX 10.11, *)
class AppDelegate: NSObject, NSApplicationDelegate {
let window = NSWindow()
let windowDelegate = WindowDelegate()
@anongit
anongit / icget.swift
Created October 8, 2018 03:23
Download .icloud files
// See: https://apple.stackexchange.com/questions/328329/is-there-a-way-via-the-command-line-to-cause-icloud-files-to-download
import Foundation
func main() {
let fm = FileManager.default
for path in CommandLine.arguments[1...] {
let url = NSURL.fileURL(withPath: path)
guard fm.fileExists(atPath: url.path) else {