Skip to content

Instantly share code, notes, and snippets.

@wangruohui
wangruohui / Install NVIDIA Driver and CUDA.md
Last active April 25, 2026 07:50
Install NVIDIA Driver and CUDA on Ubuntu / CentOS / Fedora Linux OS
@bearfrieze
bearfrieze / comprehensions.md
Last active March 13, 2026 03:04
Comprehensions in Python the Jedi way

Comprehensions in Python the Jedi way

by Bjørn Friese

Beautiful is better than ugly. Explicit is better than implicit.

-- The Zen of Python

I frequently deal with collections of things in the programs I write. Collections of droids, jedis, planets, lightsabers, starfighters, etc. When programming in Python, these collections of things are usually represented as lists, sets and dictionaries. Oftentimes, what I want to do with collections is to transform them in various ways. Comprehensions is a powerful syntax for doing just that. I use them extensively, and it's one of the things that keep me coming back to Python. Let me show you a few examples of the incredible usefulness of comprehensions.

@max-mapper
max-mapper / readme.md
Last active January 31, 2025 03:52
Video stabilization using VidStab and FFMPEG (Mac OS X)

Video stabilization using VidStab and FFMPEG

Examples here use the default settings, see the VidStab readme on GitHub for more advanced instructions.

Here's an example video I made

Install ffmpeg with the vidstab plugin from homebrew

brew install ffmpeg --with-libvidstab
@paulirish
paulirish / what-forces-layout.md
Last active May 8, 2026 17:53
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@azz
azz / react+two.js.jsx
Last active April 15, 2023 14:28
Two.js and React with ES6
"use strict";
import React from "react";
import Two from "two";
class TwoTest extends React.Component {
constructor (props) {
super(props);
this.state = {
@imjasonh
imjasonh / markdown.css
Last active September 3, 2025 22:12
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@pierandrea
pierandrea / Apps Script Code - Copy the edit response link from Google Forms entries into a Google Sheet
Last active September 9, 2024 06:46
Google Apps Script code to add Google Form edit response links to spreadsheet

Git Cheat Sheet

Commands

Getting Started

git init

or

@Nerten
Nerten / filebot-on-odroid
Last active September 28, 2021 00:11
Filebot on Odroid
# first install java8 from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
# it's 10x faster then openjdk8
# download jdk-8u101-linux-arm32-vfp-hflt.tar.gz for C1/XU4 or jdk-8u101-linux-arm64-vfp-hflt.tar.gz for C2
# sudo tar zxvf jdk-8*.tar.gz -C /opt
# sudo mv sudo mv /opt/jdk1.8.0_* /opt/jdk1.8.0
# sudo update-alternatives --install /usr/bin/javac javac /opt/jdk1.8.0/bin/javac 1
# sudo update-alternatives --install /usr/bin/java java /opt/jdk1.8.0/bin/java 1
# if installed other version of java, you need to configure for using newest by:
# sudo update-alternatives --config javac
# sudo update-alternatives --config java
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 30, 2026 08:09
Essential JavaScript Links