Skip to content

Instantly share code, notes, and snippets.

View charlesroper's full-sized avatar

Charles Roper charlesroper

View GitHub Profile
stuartlangridge /
Created February 15, 2023 23:42
A little Python script to fetch all of a person's Mastodon followers and followings and see which servers they're on
#!/usr/bin/env python3
import requests
import requests_cache
import json
def fetch(endpoint):
url = f"https://{server}/api/v1/accounts/{account_id}/{endpoint}"
#FYI - this is where the vault is created:
#Running as Admin: C:\ProgramData\ACMESharp\sysVault
#Running as User: C:\Users\NAME\AppData\Local\ACMESharp\userVault
Import-Module ACMESharp
$domain = "DOMAINNAME"
$certOutput = "C:\CertOutput\{0}\{1}" -f $domain, [guid]::NewGuid()
mkdir $certOutput
cd $certOutput
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"; // => ""
chitchcock /
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

adactio / tabledisplaytest.html
Created August 16, 2011 10:36
Content-first table-display test
<!DOCTYPE html>
<title>Table Display test</title>
@media screen and (min-width: 30em) {
body {
display: table;
caption-side: top;

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.