Skip to content

Instantly share code, notes, and snippets.

@jcupitt
jcupitt / introspect.c
Created October 18, 2019 14:19
libvips introspection demo
/* vips8 introspection demo
*
* compile with:
*
* gcc -g -Wall introspect.c `pkg-config vips --cflags --libs`
*
* This example needs vips 7.39 or later.
*
* try:
*
@apcro
apcro / gist:99ced7c8a5b20fd77622e7394c2049ac
Last active July 15, 2022 11:27
Installing libvips from source and making it work
Installing `libvips` from source on Ubuntu 18.04 Bionic
(See the first comment at https://gist.github.com/apcro/99ced7c8a5b20fd77622e7394c2049ac for a formatted version of this gist)
<code>
wget https://github.com/libvips/libvips/releases/download/v8.8.2/vips-8.8.2.tar.gz
tar -xvf vips-8.8.2.tar.gz
cd vips-8.8.2
./configure
</code>
@en4rab
en4rab / CF-U1-BIOS.md
Last active June 20, 2024 00:45
Recovering the BIOS password from a Panasonic CF-U1 mk2 (AMI Aptio UEFI)

Recovering the BIOS password from a Panasonic CF-U1 mk2 (AMI Aptio UEFI)

A mess of my own making

While messing with a CF-U1 handheld PC that I bought off ebay I managed to mess up the BIOS and it seems it reverted to previous settings which included an unknown BIOS password, it would however still boot into windows. Since I could still boot windows I was able to dump the bios flash using AFUWINGUI.EXE the version I used was 3.09.03.1462 which is available here:
https://ami.com/en/?Aptio_4_AMI_Firmware_Update_Utility.zip

@diachedelic
diachedelic / broken.svg
Created November 9, 2017 01:13
Netscape navigator broken image icon as SVG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jcupitt
jcupitt / introspect.c
Last active March 8, 2023 06:52
libvips introspection demo
/* vips8 introspection demo
*
* compile with:
*
* gcc -g -Wall introspect.c `pkg-config vips --cflags --libs`
*
* try:
*
* ./a.out embed
*
# This is based on code copied from https://bugs.ruby-lang.org/issues/12323
# to replace non-working example given in the rdocs for the OptionParser class
require 'optparse'
require 'optparse/time'
require 'ostruct'
require 'pp'
class OptparseExample
Version = '1.0.1'
@pylover
pylover / a2dp.py
Last active May 27, 2024 21:51
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3
"""Fixing bluetooth stereo headphone/headset problem in debian distros.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
Licence: Freeware
@ccawley2011
ccawley2011 / SCDsounds.bms
Created June 15, 2016 17:11
QuickBMS script to unpack pcm8.cmp in Sonic CD (PC 1996)
# Sonic CD (PC 1996) pcm8.cmp unpacker
# By Cameron Cawley
# Based on information from https://info.sonicretro.org/SCHG:Sonic_CD_(PC)#Sound_Effects
IDString "OTHE"
get EOF long
get COUNT long
get OFFSET long
for i = 0 < COUNT
@0XDE57
0XDE57 / config.md
Last active July 7, 2024 00:25
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@dannguyen
dannguyen / wget-snapshotpage.md
Last active December 25, 2023 20:57
Use wget to snapshot a page and its necessary visual dependencies

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.