Chromium OS is cool. Chromium OS with crouton is cooler. Chromium OS with Docker is even cooler. This is specifically a guide for the Chromebook Pixel 2 (2015), but I can't think of any reason it wouldn't work with other devices.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drop this into Automator using Python 3 as the shell | |
from sys import stdin | |
from json import dumps, loads | |
from urllib.parse import urlencode | |
from urllib.request import Request, urlopen | |
AZURE_ENDPOINT="getyourowndeployment.openai.azure.com" | |
OPENAI_API_KEY="getyourownkey" | |
OPENAI_API_VERSION="2023-05-15" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from atproto.firehose import FirehoseSubscribeReposClient, parse_subscribe_repos_message | |
import sys | |
from atproto import CAR, models | |
from atproto.cbor import decode_dag, decode_dag_multi | |
from atproto.xrpc_client.models.utils import get_or_create | |
import json | |
class JSONExtra(json.JSONEncoder): | |
"""raw objects sometimes contain CID() objects, which | |
seem to be references to something elsewhere in bluesky. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/starship.toml | |
[battery] | |
full_symbol = "🔋" | |
charging_symbol = "🔌" | |
discharging_symbol = "⚡" | |
[[battery.display]] | |
threshold = 30 | |
style = "bold red" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void OnActivated (UIApplication application) | |
{ | |
//When your app is backgrounded, iOS takes a snapshot. | |
//When the app comes back from the background it shows this snapshot at launch until your app is ready | |
//Sometimes apple forgets to remove the splash screen. | |
//Your app is in the forground and working. To prove it you can rotate, and see half your real screen. | |
//To prevent this from happening you can manually remove the view | |
foreach (var w in application.Windows) { | |
if (w != null && w != window) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define some variables | |
variable "aws_ubuntu_ami" { | |
default = "ami-972444ad" | |
} | |
variable "aws_keypair" { | |
default = "xxxx" | |
} | |
# AWS account details |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: ::\ | |
@echo off | |
rem () ( command -v $1 >/dev/null 2>&1; return $? ) | |
rem : "Usage sh: $ sh exists.cmd ls && echo exists " | |
rem : "Usage bat: > exists.cmd notepad " | |
rem : " > echo %ErrorLevel% " | |
rem $1 <<REM | |
:exists |
NewerOlder