Skip to content

Instantly share code, notes, and snippets.

@samgooi4189
samgooi4189 / bcm57765or57785fix
Last active April 19, 2024 04:20
Fixing Broadcom Corporation BCM57765/57785 SDXC/MMC Card Reader
Follow the WORKAROUND:
1. Add a comand to /etc/rc.local, add the following line above "exit 0":
setpci -s 00:1c.2 0x50.B=0x41
2. Add the same comand to /etc/apm/resume.d/21aspm (which does not exist yet):
setpci -s 00:1c.2 0x50.B=0x41
3. Add the following to /etc/modprobe.d/sdhci.conf:
options sdhci debug_quirks2=4
4. Re-generate initrd:
sudo update-initramfs -u -k all
5. Reboot or reload sdhci module:
@sbonfert
sbonfert / root-ro
Last active June 24, 2019 17:25 — forked from niun/root-ro
Read-only Root-FS with overlayfs for Raspian
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2016 by Stefan Bonfert to make it compatible with Raspbian
# Jessie (vanilla).
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#
@mislav
mislav / star-trek-all.tsv
Last active November 1, 2023 03:11
List of Star Trek: The Original Series episodes ranked by their meta-score aggregated from several sites
S-EP episode title score
1-01 The Man Trap -33
1-02 Charlie X 26
1-03 Where No Man Has Gone Before 34
1-04 The Naked Time 64
1-05 The Enemy Within 30
1-06 Mudd's Women -31
1-07 What Are Little Girls Made Of? -1
1-08 Miri -30
1-09 Dagger of the Mind 8
@Brainiarc7
Brainiarc7 / VAAPI-hwaccel-encode-Linux-Ffmpeg&Libav-setup.md
Last active March 26, 2024 18:18
This gist contains instructions on setting up FFmpeg and Libav to use VAAPI-based hardware accelerated encoding (on supported platforms) for H.264 (and H.265 on supported hardware) video formats.

Using VAAPI's hardware accelerated video encoding on Linux with Intel's hardware on FFmpeg and libav

Hello, brethren :-)

As it turns out, the current version of FFmpeg (version 3.1 released earlier today) and libav (master branch) supports full H.264 and HEVC encode in VAAPI on supported hardware that works reliably well to be termed "production-ready".

anonymous
anonymous / list27.txt
Created May 8, 2016 17:40
000(023Rb|001Rb)
001(017La|002Rb)
002(021La|003Rb)
003(021La|004La)
004(009Rb|005Lb)
005(004Ra|005La)
006(008La|007La)
007(009Rb|007La)
008(009Ra|008La)
009(010Ra|026Ra)
@Nyx0uf
Nyx0uf / NYXAVCEncoder.swift
Created February 3, 2016 10:35
Hardware accelerated GIF to MP4 converter in Swift using VideoToolbox
import VideoToolbox
import AVFoundation
private var __canHWAVC: Bool = false
private var __tokenHWAVC: dispatch_once_t = 0
public protocol NYXAVCEncoderDelegate : class
{
func didEncodeFrame(frame: CMSampleBuffer)
func didFailToEncodeFrame()
@nuomi1
nuomi1 / PrintBootCampESDInfo.swift
Last active April 28, 2024 00:05
macOS and BootCamp Latest
#!/usr/bin/env swift
//
// PrintBootCampESDInfo.swift
//
// Created by nuomi1 on 8/5/18.
// Copyright © 2018年 nuomi1. All rights reserved.
//
import Foundation
@stevenmirabito
stevenmirabito / broadcom-wl-dkms.sh
Last active January 5, 2023 19:26
Installs the broadcom-wl kernel module with DKMS
#!/bin/bash
# Installs the broadcom-wl kernel module with DKMS
# Tested under Fedora 23, will likely work with other versions/distros
# Author: Steven Mirabito <smirabito@csh.rit.edu>
# Create a work directory
mkdir -p /tmp/broadcom
cd /tmp/broadcom
# Download the module from Broadcom (http://www.broadcom.com/support/?gid=1)
@mkaminsky11
mkaminsky11 / wl_monitor.sh
Last active December 1, 2023 17:59
Enables monitor mode for wl driver(Broadcom)
#!/bin/sh
# so, by default, monitoring and injection cannot be used with Broadcom wl wifi drivers (such as those for Macs)
# this makes it impossible to do stuff like crack wifi passwords with aircrack-ng
# fortunately, there is a solution burried in https://www.broadcom.com/docs/linux_sta/README.txt
echo 1 > /proc/brcm_monitor0 #enables monitor mode. That's it!
# prism0 is now like "mon0" (monitor mode)
@L-A
L-A / moonobject.js
Created August 28, 2012 13:20
Moon phase calculation
var MoonInfo = function(day, month, year) {
var n0 = parseInt( "0" );
var f0 = parseFloat( "0.0" );
var AG = f0; // Moon's age
var DI = f0; // Moon's distance in earth radii
var LA = f0; // Moon's ecliptic latitude
var LO = f0; // Moon's ecliptic longitude
var Phase = " ";
var Zodiac = " ";