Skip to content

Instantly share code, notes, and snippets.

View jay-w-opus's full-sized avatar

Jay W. jay-w-opus

View GitHub Profile
cd /tmp
cat > countdown.txt << EOF
999999999
99:::::::::99
99:::::::::::::99
9::::::99999::::::9
9:::::9 9:::::9
9:::::9 9:::::9
@jay-w-opus
jay-w-opus / tencentcloud-webar.d.ts
Created September 27, 2022 04:55
tencentcloud-webar.d.ts
/* eslint no-dupe-class-members: 0 */
declare module 'tencentcloud-webar' {
declare const isWebGLSupported: boolean
type ModuleConfig = {
beautify: boolean
segmentation: boolean
}
type AuthConfig = {
@jay-w-opus
jay-w-opus / install-docker.sh
Last active September 20, 2022 12:33
Install Docker with script, with region mirrors
#!/usr/bin/env bash
sudo -v
# for ARM
repo=ubuntu
if [[ $(uname -p) == 'arm' ]]
then
repo=ubuntu_ports
fi
@jay-w-opus
jay-w-opus / sync.sh
Created March 2, 2020 08:41
unison sync tool
#!/bin/bash
# This script is for Mac OS X
# Your remote Linux server should have unison of the same version (check unison -version).
# this file allows you to sync a local folder to a remote server's location via ssh
# it supports two modes:
# 1. continuous watch-and-sync, if you provide one argument, which is the ssh server's Host name (defined in .ssh/config).
# If you need to exit, you need to press ctrl+c twice
# 2. one-time batch sync, if you provide multiple ssh hosts.
@jay-w-opus
jay-w-opus / gist:ee8c2e644cd87e533edc39e5db27215c
Created February 15, 2020 06:55
Tempermoney: 2x or 3x while pressing down a key in Youtube
// ==UserScript==
// @name Speed up video
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.youtube.com/watch?*
// @grant none
// ==/UserScript==
@jay-w-opus
jay-w-opus / chrome-spindump.txt
Created February 13, 2019 09:19
Google Chrome freeze after window swtich
Sampling process 83501 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Google Chrome Canary (pid 83501) every 1 millisecond
Process: Google Chrome Canary [83501]
Path: /Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary
Load Address: 0x10fbdb000
Identifier: com.google.Chrome.canary
Version: 74.0.3702.0 (3702.0)
Code Type: X86-64
Parent Process: ??? [1]
@jay-w-opus
jay-w-opus / gist:8fdcf4a5286e8702890e
Created October 27, 2014 05:58
check-iphone-avai.sh
curl -s 'http://store.apple.com/us/retailStore/availabilitySearch?parts.0=MGAW2LL%2FA&zip=94043' --compressed | grep -oP "city...[^\"]*\"|pickupSearchQuote...[^\"]*\"" | cut -d':' -f2