A list of 25 apple.com/...
URLs was extracted from /usr/share/man
. Nearly half of them are now broken links. Links pointing to developers.apple.com in particular are often broken. (9 out 19, or ~47%)
Here's the list of just the broken URLs:
A list of 25 apple.com/...
URLs was extracted from /usr/share/man
. Nearly half of them are now broken links. Links pointing to developers.apple.com in particular are often broken. (9 out 19, or ~47%)
Here's the list of just the broken URLs:
/* file: main.c function: get and set capslock state complie: gcc -std=c99 -framework IOKit -framework CoreFoundation -o | |
* capslock main.c usage: ./capslock [0|1|-1] 0 : capslock off 1 : capslock on -1 : toggle capslock state : print | |
* current capslock state (0|1) * written and published as free software by Hiroto, 2015-06 */ | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <IOKit/IOKitLib.h> | |
#include <IOKit/hidsystem/IOHIDLib.h> | |
#include <IOKit/hidsystem/IOHIDParameter.h> | |
#include <libgen.h> // basename | |
#define CAPSLOCK_OFF 0 | |
#define CAPSLOCK_ON 1 |
#!/usr/bin/osascript -l JavaScript | |
# Usage: capstoggle.sh [1 or 0, defaulting to 0] | |
# Pass in "1" to turn caps lock on. By default it turns caps lock off (0) | |
# | |
# Make this an executable shell script by running `chmod +x capstoggle.sh` | |
# Then `./capstoggle.sh 1` to turn caps lock on, and hence toggle the caps lock keyboard light! | |
# You can make your caps lock light flash 5 times by running this | |
# for i in {0..5}; do ./capstoggle.sh 1; ./capstoggle.sh 0; done | |
ObjC.import("IOKit"); |
#!/bin/bash | |
# dontforget | |
# | |
# A stupid script for short term reminders in bash | |
# | |
# UPDATE: Tweaked to work on macOS catalina in 2020! (no more launchbar.app). Also removed the `say` | |
# | |
# Arguments just need to contain a number and a bunch of words. | |
# | |
# The number can be anywhere in the arguments, but there shouldn't |
Nothing spicy here. I just found some things interesting like all their scripts and that it looks like they host on github. | |
I'm uploading the 4.5.0 version and the 4.7.0 version. Compare the diff and you can see some things that changed! Like their switch to yarn. | |
First, you need to install this extension: https://chrome.google.com/webstore/detail/requirify/gajpkncnknlljkhblhllcnnfjpbcmebm/related
Then:
require("ctp", "chinese-to-pinyin");
Finished getting chinese-to-pinyin
// varenc's very simple fork of dnicolson's gist. | |
// | |
// changelog: on start immediately output the current MediaRemote state | |
// todo: might turn this into a command line util for personal workflow automation. | |
// | |
// clang -x objective-c -framework Foundation -framework MediaRemote -F /System/Library/PrivateFrameworks MediaRemoteEvents.m -o MediaRemoteEvents.m | |
// ./MediaRemoteEvents.m | |
#import <Foundation/Foundation.h> |
####### Dropbox link fixers for macOS ######## | |
# This daemon converts all Dropbox shared links in the clipboard to direct links. The url provide the raw files instead of all the Dropbox bloat/previews. | |
# To run, just do | |
# $ python3 ./dropbox-url-swap.py | |
# | |
# (requires python3.6+ with f-string support) | |
# To fix the Dropbox links it usually just changes the "dl=0" query arg into the rather obscure "raw=1" option. | |
# Though for certain type it provides an even more direct link that isn't delayed by an instant redirect. | |
# | |
# To provide this we have to poll the clipboard to monitor for changes, but by using the Darwin NSPasteboard |
# Unofficial Hombrew Cask for Audacity 2.3.2 (recent 64-bit version) | |
# Made entirely for fun and to demonstrate how to get around fosshub's limitations. | |
# Problem: Audacity's binary is hosted on fosshub and they don't provide a fixed url! The seems to intentionally try to prevent "hot-linking". | |
# Solution: Make a request to fosshub's special XHR endpoint to get the signed download url. Then just pass that URL to Homebrew | |
require 'net/http' | |
require 'json' | |
require 'uri' |
#!/usr/bin/env bash | |
# Copy the url of the active ngrok connection to the clipboard. Updated for latest ngrok (Oct 2019) | |
# | |
# Usage: | |
# ngrok-copy # copies e.g. https://3cd67858.ngrok.io to clipboard. | |
# ngrok-copy -u # copies e.g. http://3cd67858.ngrok.io to clipboard. | |
# | |
# Modified from the original script at https://gist.github.com/mlsteele/f57adc1fab5c44656d6d | |