Skip to content

Instantly share code, notes, and snippets.

@progers
progers / gist:998452a15180ae369fee338bb39363fd
Created August 5, 2022 12:56
Git bisect script for running a new test that has been stashed
bisect-stash-build-run.sh
----------8<----------
#!/bin/bash
git stash apply || exit 125
# build the test
# for a chromium/blink unittest, this is:
# ( echo n | gclient sync ) || exit 125
# autoninja -C out/Debug blink_unittests || exit 125
# run the test
@IanColdwater
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@Birch-san
Birch-san / make_portable.sh
Last active March 1, 2023 18:33
Make a macOS executable binary or .dylib portable
#!/usr/bin/env bash
# Licensed by author Alex Birch under CC BY-SA 4.0
# https://creativecommons.org/licenses/by-sa/4.0/
# Example input:
# ./make_portable.sh mycoolbinary
# where mycoolbinary is a mach-o object file
# (for example an executable binary or a .dylib)
#
@surma
surma / README.md
Last active March 8, 2024 12:06
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@jackersson
jackersson / build-gstreamer.sh
Last active March 27, 2023 02:06
Build gstreamer from source
#!/bin/bash
# Set your target branch
BRANCH="1.14.2"
exec > >(tee build-gstreamer.log)
exec 2>&1
[ ! -d orc ] && git clone git://anongit.freedesktop.org/git/gstreamer/orc
[ ! -d gstreamer ] && git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer
@bwhitman
bwhitman / picblast.sh
Created May 8, 2017 21:30
Make an audio collage out of your live photos
mkdir /tmp/picblast; cd ~/Pictures/Photos\ Library.photoslibrary; for i in `find . | grep jpegvideocompl`;do ffmpeg -i $i /tmp/picblast/${i:(-8)}.wav; done; cd /tmp/picblast; ffmpeg -safe 0 -f concat -i <( for f in *.wav; do echo "file '$(pwd)/$f'"; done ) ~/Desktop/picblast.wav; rm -rf /tmp/picblast
@paulirish
paulirish / what-forces-layout.md
Last active June 19, 2024 15:52
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
@drkameleon
drkameleon / gist:24f5207a8aa0177b284b
Created September 14, 2014 08:56
View-Based NSOutlineView Example
//
// AppDelegate.m
// sourceList
//
// Created by Dr.Kameleon on 9/14/14.
// Copyright (c) 2014 InSili.co. All rights reserved.
//
#import "AppDelegate.h"
@joyrexus
joyrexus / README.md
Last active May 3, 2024 11:41
Form/file uploads with hapi.js

Demo of multipart form/file uploading with hapi.js.

Usage

npm install
npm run setup
npm run server

Then ...

@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 14, 2024 03:50
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global: