Skip to content

Instantly share code, notes, and snippets.

View ishansharma's full-sized avatar

Ishan Sharma ishansharma

View GitHub Profile
@Iomegan
Iomegan / MacSystemSoundsExtension.swift
Last active January 20, 2022 12:37
Array of all installed system sounds
extension NSSound {
static var systemSounds: [String] {
get {
var returnArr = [String]()
let librarySources = (NSSearchPathForDirectoriesInDomains(.libraryDirectory, .allDomainsMask, true) as NSArray).objectEnumerator()
var sourcePath = librarySources.nextObject() as? String
while (sourcePath != nil) {
let soundSource = FileManager.default.enumerator(atPath: URL(string: sourcePath!)!.appendingPathComponent("Sounds").absoluteString)
@itst
itst / Pinboard.scpt
Last active January 10, 2024 11:40
Import and regularly replicate your Pinboard bookmarks in DEVONthink.
(* Import and update your Pinboard bookmarks to DEVONthink
Based on work done by Christian Grunenberg on Mon Jan 23 2006,
Rafael Bugajewski to support Pinboard instead of Delicious on Sun Dec 19 2010 and
Andreas Zeitler on Sun Mar 03 2011 to display user feedback when finished.
By Sascha A. Carlin <https://sascha.carlin.de/> on 2018-03-07 to set the creation date of new record, show progress bar, use Pinboard Auth Token, use modification date of folder to fetch only recent items
Copyright (c) 2018. All rights reserved. *)
use framework "Foundation"
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"