Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Strzelecki nanoant

View GitHub Profile
@nanoant
nanoant / icget.swift
Created Aug 13, 2019 — forked from anongit/icget.swift
Download .icloud files
View icget.swift
// 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 {
@nanoant
nanoant / pre-receive
Last active Dec 10, 2015 — forked from iley/pre-receive
pre-receive hook to deny pushing big files
View pre-receive
#!/usr/bin/perl -wl
use strict;
my $limit = 20 * 1024 * 1024;
my $hasBadFiles;
# human friendly sizes
sub hsize {
# http://www.perlmonks.org/?node_id=378580
(sort { length $a <=> length $b } map { sprintf '%.2g %s',
You can’t perform that action at this time.