Preconditions:
- POSIX or Windows system
- Install Docker
- A GitHub repo that already builds on Travis
Postcondition:
This file contains hidden or 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/sh | |
| # Build llama.cpp on Ubuntu 24.04 with AMD GPU support | |
| sudo apt -y install git wget hipcc libhipblas-dev librocblas-dev cmake build-essential | |
| # ensure you have the necessary permissions by adding yourself to the video and render groups | |
| sudo usermod -aG video,render $USER | |
| # reboot to apply the group changes | |
| # run rocminfo to check everything is working thus far |
This file contains hidden or 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
| // Run code in Browser Console after enabling chrome debugging -- | |
| // about:config => devtools.chrome.enabled => true | |
| // https://developer.mozilla.org/docs/Tools/Browser_Console | |
| try { | |
| var tabPromise = SyncedTabs._internal.getTabClients(); | |
| tabPromise.then((arrDevices) => { | |
| if (arrDevices && arrDevices.length > 0){ | |
| // Generate a string with the format of a bookmark export file | |
| var d, e, out = '<!DOCTYPE NETSCAPE-Bookmark-file-1>\n<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">\n<TITLE>Bookmarks</TITLE>\n<H1>Bookmarks Menu</H1>\n<DL><p>\n'; | |
| const escapeHtmlEntities = function(aText){return (aText || '').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''')}; |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| while [[ -n "$1" ]] ; do | |
| case "$1" in | |
| --minor) | |
| MINOR=true | |
| ;; | |
| --major) | |
| MAJOR=true | |
| ;; |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| function get_headphones_index() { | |
| echo $(pacmd list-cards | grep bluez_card -B1 | grep index | awk '{print $2}') | |
| } | |
| function get_headphones_mac_address() { | |
| local temp=$(pacmd list-cards | grep bluez_card -C20 | grep 'device.string' | cut -d' ' -f 3) | |
| temp="${temp%\"}" | |
| temp="${temp#\"}" |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| set -eo pipefail | |
| # from moby project - w/o go dependency (nailing amd64) and w/o jq dep (using | |
| # python) | |
| # hello-world latest ef872312fe1b 3 months ago 910 B | |
| # hello-world latest ef872312fe1bbc5e05aae626791a47ee9b032efa8f3bda39cc0be7b56bfe59b9 3 months ago 910 B | |
| # debian latest f6fab3b798be 10 weeks ago 85.1 MB | |
| # debian latest f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd 10 weeks ago 85.1 MB |
This file contains hidden or 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 lxml import html, etree | |
| import datetime | |
| import requests | |
| import re | |
| import os | |
| import sys | |
| import unicodecsv as csv | |
| import argparse | |
| import json | |
| # from exceptions import ValueError |
This file contains hidden or 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
| sysadminctl is a tool Apple introduced in 10.10 for working with system user accounts. In 10.13, | |
| sysadminctl is Apple's recommended tool for working with user accounts in the CLI, replacing functionality | |
| that has long been provided by dscl and adds new features available only in 10.13. | |
| sysadminctl can be used to change user passwords, create new users (including automatically provisioning | |
| the user home folder) or check the status of a new-to-10.13 security feature named SecureToken. | |
| SecureToken is a user attribute like password type or user home location. SecureToken is not publicly | |
| documented by Apple so it is not possible to provide a full technical description, but in practice one | |
| needs only to know if a user has SecureToken or not. Having SecureToken set signifies that a user can | |
| unlock a FileVault-encrypted volume. Without the SecureToken bit on a user account, that user will not |
This file contains hidden or 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
| # 10_basic.py | |
| # 15_make_soup.py | |
| # 20_search.py | |
| # 25_navigation.py | |
| # 30_edit.py | |
| # 40_encoding.py | |
| # 50_parse_only_part.py |
Statix is a stand-alone Bash script aimed at generating full-featured, routable static websites from reusable HTML snippets. It features the most basic templating engine ever possible but allows to organize your content in a SEO-friendly way. All Statix-based websites contain these parts:
- Templates: a directory where all HTML templates are stored
- Route configuration: a file that maps each publicly accessible template to a SEO-friendly URL
- Assets: a directory with optional files copied to the output website directory with no processing.
This script is also lightweight. Aside from some standard file management commands such as cp, mkdir and rm, the only serious dependency for Statix is GNU Grep compiled with PCRE support (i.e. the version that supports -P flag, included in most Linux distributions).
NewerOlder