Skip to content

Instantly share code, notes, and snippets.

View plummer's full-sized avatar

Andrew Plummer plummer

View GitHub Profile
@lattner
lattner / TaskConcurrencyManifesto.md
Last active October 18, 2025 15:19
Swift Concurrency Manifesto
@algal
algal / tsv_to_json.swift
Last active April 22, 2023 10:01
Quick CSV to JSON in Swift
import Foundation
// Swift 2.0
// poor man's parsers for (TSV) tab-separated value files
// for something more full-featured, the best avenue is CHCSVParser
/**
Reads a multiline, tab-separated String and returns an Array<NSictionary>, taking column names from the first line or an explicit parameter
*/
@krisbulman
krisbulman / countCSSRules.js
Last active February 27, 2025 22:33 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE. — This snippet has been modified to count more than just the first level of CSSStyleRule objects within CSSMediaRule.
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
@plentz
plentz / nginx.conf
Last active October 16, 2025 13:27
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048