Skip to content

Instantly share code, notes, and snippets.

View kcmannem's full-sized avatar
◾️

Krishna Mannem kcmannem

◾️
View GitHub Profile
@mattleiphamellis
mattleiphamellis / scrypted-for-mac-background-service-launchd.md
Last active February 8, 2025 12:14
Allow Scrypted for macOS to run at boot as a background service (pre-login) via Launch Daemon

Scrypted for macOS can currently be installed as a Desktop application or background service that runs automatically on login as a user-level Launch Agent. If the system reboots or the user is logged out, however, Scrypted is unavailable until the user logs back in. These instructions allow Scrypted to run at boot without any user logged in.

Prerequisites:

  1. Install Scrypted by following the Mac: Command Line Installation docs
  2. Verify that Scrypted runs automatically at login

Terminal commands to enable launch at boot:

launchctl unload ~/Library/LaunchAgents/app.scrypted.server.plist
sudo cp ~/Library/LaunchAgents/app.scrypted.server.plist /Library/LaunchDaemons/
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@kekru
kekru / Docker connect to remote server.md
Last active March 21, 2025 01:29
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

/// Compare and swap references.
///
/// This function compares the reference `old` to the reference in the
/// location referenced by `to`. If the references match, this method
/// stores the reference `new` to that location atomically.
///
/// Similar to a pointer compare-and-swap, but safe for owned (retaining) pointers:
/// - ObjC: `MyObject *__strong *`
/// - Swift: `UnsafeMutablePointer<MyObject>`
/// If the swap is made, the new value is retained by its owning pointer.
@ygotthilf
ygotthilf / jwtRS256.sh
Last active April 3, 2025 11:49
How to generate JWT RS256 key
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub
cat jwtRS256.key
cat jwtRS256.key.pub
@Coneko
Coneko / gist:4234842
Created December 7, 2012 17:24
How to get your code to run on different cores in OSX / iOS without CHUD.
#import <pthread.h>
#import <mach/thread_act.h>
// These two functions are declared in mach/thread_policy.h, but are commented out.
// They are documented here: https://developer.apple.com/library/mac/#releasenotes/Performance/RN-AffinityAPI/_index.html
kern_return_t thread_policy_set(
thread_t thread,
thread_policy_flavor_t flavor,
thread_policy_t policy_info,
mach_msg_type_number_t count);