Skip to content

Instantly share code, notes, and snippets.

@tatsuyasusukida
tatsuyasusukida / !README-javascript-media-video.md
Last active May 9, 2024 02:01
🎥 How to record a video with JavaScript [demo video available]

🎥 How to record a video with JavaScript [demo video available]

Demo video: How to record a video with JavaScript

About this article

This article describes how to shoot a video from JavaScript using the MediaStream Recording API. The related resources are shown below.

@cceddie
cceddie / gct-applescript-0.2
Created November 30, 2012 09:05
get Chrome tabs, write to executable bash file
-- gct: get chrome tabs
-- save FRONTMOST WINDOW of Chrome (or safari, but definitely not firefox) tabs into a file
-- optionally (by uncommenting) CLOSE the window
-- modified from http://www.leancrew.com/all-this/2012/10/saving-browser-tab-sets/
-- ------------------------------------------------------------
-- cce
-- 2012 nov- rev 0.2
-- - why do i punish myself with applescript?
--
-- ------------------------------------------------------------
@stephancasas
stephancasas / AdvancedToolbarWindow.swift
Last active May 9, 2024 01:58
A SwiftUI-compatible window for macOS with advanced toolbar configurability.
//
// AdvancedToolbarWindow.swift
//
// Created by Stephan Casas on 3/17/23.
//
import SwiftUI;
import AppKit;
class AdvancedToolbarWindow<MainContent: View, ToolbarContent: View, TitleToolbarContent: View>: NSWindow, NSToolbarDelegate {
@enikidis
enikidis / in.elastic
Last active May 9, 2024 01:58
Modified elastic constnat for tetragonal
# Compute elastic constant tensor for a crystal
#
# Written by Aidan Thompson (Sandia, athomps@sandia.gov)
#
# ---------------------------------------------------------------------------------------------
# The editor of this script is Nikidis Efstratios, a member of the COSSPHY lab in the Physics
# department, Solid State Section, Aristotle University of Thessaloniki.
# Date: 2023-5-8
# ---------------------------------------------------------------------------------------------
# This script uses the following three include files.
@mwufi
mwufi / install_docker_in_colab.sh
Last active May 9, 2024 01:54
Install Docker in Google Colab!
# First let's update all the packages to the latest ones with the following command
sudo apt update -qq
# Now we want to install some prerequisite packages which will let us use HTTPS over apt
sudo apt install apt-transport-https ca-certificates curl software-properties-common -qq
# After that we will add the GPG key for the official Docker repository to the system
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# We will add the Docker repository to our APT sources
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@CarloCattano
CarloCattano / pi_MIDI_Brain.md
Last active May 9, 2024 01:48
Raspberry pi UART MIDI Serial

rp3.+ raspberry OS lite (or better PatchboxOS as a starting point)

https://blokas.io/patchbox-os/

testing notes
Disable bluetooth or send bt to another serial port
    sudo nano /boot/config.txt

    enable_uart=1    
   
 dtoverlay=midi-uart0
@imba-tjd
imba-tjd / .Cloud.md
Last active May 9, 2024 01:48
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合

@m0rph03nix
m0rph03nix / Dockerfile
Last active May 9, 2024 01:47
Run Whisper.cpp in docker with mic audio streaming
FROM debian:11.7-slim AS build
RUN apt-get update \
&& apt-get install -y libsdl2-dev alsa-utils g++ make wget
RUN mkdir /whisper && \
wget -q https://github.com/ggerganov/whisper.cpp/tarball/master -O - | \
tar -xz -C /whisper --strip-components 1
WORKDIR /whisper