Skip to content

Instantly share code, notes, and snippets.

<svg width="300" height="300" viewBox="0 0 300 300">
<defs>
<filter id="paperEffect">
<feTurbulence
type="fractalNoise"
baseFrequency="0.04"
numOctaves="5"
result="noise"
/>
<feDiffuseLighting
@gmolveau
gmolveau / firefox_dark_background.md
Last active December 28, 2024 01:52
Firefox dark background / theme for new tab and loading screen

Firefox Dark Background

  • How to change the background on Firefox to a dark one on new tab / loading screen ?

Procedure

  • Type about:config in the URL bar
  • Search toolkit.legacyUserProfileCustomizations.stylesheets and double-click the field to set it to true
  • Type about:support in the URL bar
  • Look for Profile folder field and click on the open button next to it.
@jbaranski
jbaranski / ffmpeg_mac_m1_record_cmd_line.md
Last active December 28, 2024 01:51
ffmpeg record screen on Mac M1 chip via command line

ffmpeg record screen on Mac M1 chip via command line

  1. Install ffmpeg.

brew install ffmpeg

  1. Figure out which device to use.

ffmpeg -f avfoundation -list_devices true -i ""

Ouput will look like:

@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active December 28, 2024 01:50
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@rrafal
rrafal / sqlx_json.go
Created March 31, 2016 00:02
Use JSON field with golang sqlx driver
package main
import (
"encoding/json"
"errors"
"database/sql/driver"
"fmt"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
"log"
@endofunky
endofunky / service.macchanger.nix
Created July 5, 2021 19:56
macchanger/systemd for NixOS
{ config, lib, pkgs, ...}:
with lib;
let
cfg = config.sec.macchanger;
in {
options = {
sec.macchanger = {
enable = mkOption {
@baymaxium
baymaxium / content.md
Created October 18, 2017 08:31
如何阅读一份代码?

原文:程序人生

上文谈到了像读书一样阅读源码的重要性,今天谈谈如何阅读一份代码。我所谓的一份代码,其范围可能从几千行到数万行,有时甚至可多达数十万行。这些代码作为一个有机体,共同完成某些重要的功能。比如说几个著名的 full fledged web framework,祖师爷 rails,师叔 django 和小师妹 phoenix:

import time
import requests
import logging
import boto3
from botocore.config import Config
def send_price_data_to_timestream(write_client):
base_url = "https://min-api.cryptocompare.com/data"
symbols = "BTC,ETH,REP,DASH"
@fnky
fnky / ANSI.md
Last active December 28, 2024 01:30
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27