Skip to content

Instantly share code, notes, and snippets.

View chrisdiana's full-sized avatar

Chris Diana chrisdiana

View GitHub Profile
@chrisdiana
chrisdiana / arch-chromebook.md
Last active September 23, 2023 20:17
Arch Linux on Chromebook Flip C100P

Arch Linux on Chromebook Flip C100P

The ASUS Chromebook Flip C100P (veyron_minnie) is the world's first 10" convertible Chromebook with a full metal chassis, so a user can go from laptop to tablet form factor in a snap. The ASUS Chromebook Flip is powered by a Rockchip quad-core processor with 2GB RAM for incredible performance.

It has a 10-finger multi-touch screen, with a comfortable wide key-pitch keyboard and up to 8 hours battery life for all-day mobile use. The connectivity with dual-band WiFi 802.11ac & BT4.0 support can also provide up to 3 times the speed of 802.11n for faster data transfer. Carved from a single block of aluminum for a seamless design, the ASUS Chromebook Flip is not only beautiful, but durable, too.

These instructions will create a dual-booting environment where you can switch between booting Arch Linux ARM and the stock ChromeOS. No changes are made to the internal eMMC drive, and your new Arch Linux ARM install will run completely from external storage. This is the recommen

@chrisdiana
chrisdiana / mosh-macos.md
Last active February 1, 2024 06:11
Getting mosh server running on macOS Catalina

Running into this error message when trying to run a mosh server on macOS Catalina? The steps below should solve the problem which is most likely either a $PATH and/or firewall issues.

command not found: mosh-server
Connection to X.X.X.X closed.
/usr/local/bin/mosh: Did not find mosh server startup message. (Have you installed mosh on your server?)

1. Install Mosh

@chrisdiana
chrisdiana / convert_hex_xterm.py
Created January 29, 2015 23:23
Convert hex color code to closest xterm-256 value
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@chrisdiana
chrisdiana / export-cognito-users.sh
Last active March 18, 2024 09:38
Export AWS Cognito User Pool
# Export as Text Table
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output table > ~/users.txt
# Export as JSON
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --output json > ~/users.json
# Export User Pool with more than 60 users (pagination)
aws --region XXXXXXXXX cognito-idp list-users --user-pool-id XXXXXXXXXXXXX --pagination-token INCREDIBLYLONGSTRINGHERE --output json > ~/users-2.json
@chrisdiana
chrisdiana / opz-cheatsheet.md
Last active March 29, 2024 01:25
OP-Z Cheatsheet

OP-Z Cheatsheet

General

  • Play: Press Play
  • Stop: Press Stop
  • Sequence: Hold Trig + key
  • Sequence v2: Hold Rec + keys
  • Live Record: Hold Rec + Play + key/Play
  • Stop Recording: Press Rec
@chrisdiana
chrisdiana / gist:731aa653982e2d905776
Created October 22, 2014 21:20
Convert time to human readable time in Javascript
function millisecondsToStr (milliseconds) {
// TIP: to find current time in milliseconds, use:
// var current_time_milliseconds = new Date().getTime();
function numberEnding (number) {
return (number > 1) ? 's' : '';
}
var temp = Math.floor(milliseconds / 1000);
var years = Math.floor(temp / 31536000);