Skip to content

Instantly share code, notes, and snippets.

View ross-spencer's full-sized avatar
💭
🖖

Ross Spencer ross-spencer

💭
🖖
View GitHub Profile
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@hubgit
hubgit / README.md
Last active May 27, 2024 03:48
Remove metadata from a PDF file, using exiftool and qpdf. Note that embedded objects may still contain metadata.

Anonymising PDFs

PDF metadata

Metadata in PDF files can be stored in at least two places:

  • the Info Dictionary, a limited set of key/value pairs
  • XMP packets, which contain RDF statements expressed as XML

PDF files

@rxaviers
rxaviers / gist:7360908
Last active June 8, 2024 15:23
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mathiasrw
mathiasrw / True Trello Printer
Last active February 27, 2024 21:21
Ever wanted to print your Trello board? Export as JSON and paste it into the code.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>True Trello Printer</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<style>
body{margin:15%;}
.panel-body{

Experimental attempt at getting organized ...

05/06/2024

Mastodon preview cards

This explains setup on Jekyll site:

@paniq
paniq / pico8.txt
Last active March 20, 2022 21:11
PICO-8 hacks & secrets
Screen resolutions
------------------
PICO-8 supports different undocumented videomodes that can be activated at runtime,
using poke(0x5F2C, X) where X is one of the following mode numbers:
0: 128x128, 0 pages
1: 64x128, 1 page
2: 128x64, 1 page
3: 64x64, 3 pages
{
"formats": [
{
"format": {
"id": "archives-nz-dev-signature/1",
"name": "Adobe Air",
"version": "1.0",
"mime": "application/vnd.adobe.air-application-installer-package+zip",
"extensions": [
"air"
// PREPARATORY CHANGES TO SF
1. Use existing -hash flag but change behaviour so can accept a comma separated list of hashes e.g. -hash md5,ssdeep
2. change hash.go file (under /cmd/) so that checksum var is a slice of hashes var checksum []hash.Hash
3. writer interface (cmd/writers.go) updated so writeFile method takes a slice of byte slices for checksum digests (checksum [][]byte)
And all writers (JSON, CSV, YAML etc) updated so they can accept multiple checksum digests.
4. in cmd/sf.go update the identifyRdr func so it ranges through the slice of checksums, calculating for each, and returns a slice of byte slices for checksum digests
// SQLITEANALYSIS CHANGES
5. copy the hash.go flag as hash_sqliteanalysis.go and prepend build tag
6. add spamspam as an import and update the functions in this file
@anjackson
anjackson / breakdown.md
Last active November 9, 2015 00:27
Ideal WARC ID result?

When analysing example.warc.gz containing a HTML response that was GZip encoded.

  • application/warc
    • application/gzip
      (outer gzip chunk)
      • application/warc; version="1.0", type=response
        (The whole WARC Record)
        • application/http; msgtype=response
          (WARC Record content, i.e. HTTP headers and entity body)
          • application/gzip
            (i.e. the entity body is compressed)
            • text/html; version=5
@chrpr
chrpr / pcdm.ttl
Last active December 2, 2021 09:21
PCDM as Turtle
charper:~$ rapper -i rdfxml -o turtle models.rdf -O https://raw.githubusercontent.com/duraspace/pcdm/master/models.rdf
rapper: Parsing URI file:///home/charper/models.rdf with parser rdfxml
rapper: Serializing with serializer turtle and base URI https://raw.githubusercontent.com/duraspace/pcdm/master/models.rdf
@base <https://raw.githubusercontent.com/duraspace/pcdm/master/models.rdf> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix ldp: <http://www.w3.org/ns/ldp#> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .