Skip to content

Instantly share code, notes, and snippets.

View surfmuggle's full-sized avatar
💭
Browsing stuff

surfmuggle surfmuggle

💭
Browsing stuff
View GitHub Profile
@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@gmanny
gmanny / AdditionalSetup.cs
Created October 31, 2020 17:37
Dark Mode for RoslynPad
using System;
using System.IO;
using System.Windows;
using System.Windows.Input;
using System.Windows.Media;
using Microsoft.CodeAnalysis;
using RoslynPad.Editor;
using WpfAppCommon;
namespace Namespace
@shisama
shisama / proxy_server.js
Last active September 20, 2023 14:26
Node.js Proxy Server with Basic Auth Sample
const http = require("http");
const { parse } = require("basic-auth");
const { PROXY_USERNAME, PROXY_PASSWORD } = process.env;
const PROXY_PORT = process.env.PROXY_PORT || 8000;
const check = (credentials) => {
return (
credentials &&
credentials.username === PROXY_USERNAME &&
credentials.pass === PROXY_PASSWORD
@latkin
latkin / extendAPIWithUnits.md
Last active March 31, 2016 21:39
How to extend a 3rd-party API with F# units of measure

Extending a 3rd-party API with F# units of measure

F# units of measure are nice, but what if I'm using a 3rd-party library which doesn't support UOM? I don't want to re-implement the library, but it would be nice to add the extra safety afforded by UOM. Can I somehow annotate the APIs of the 3rd party library with units?

Yes!

How to do it

Say you have some unit-free external library like this, which you can't modify:

@rodneyrehm
rodneyrehm / gist:40e7946c0cff68a31cea
Last active November 7, 2022 09:11
Diagrams for Documentation

some tools for diagrams in software documentation

Diagrams For Documentation

Obvious Choices

ASCII

@barneycarroll
barneycarroll / fileInput.css
Last active April 2, 2023 22:21
Total input[type=file] style control with pure CSS. File type inputs are notoriously hard to style, due to different semi-serious style restrictions in the name of security (the argument being that a file input presents access to the user's private file system, and should as such always look unambiguously like what it is — redundant if you ask m…
.fileContainer {
overflow: hidden;
position: relative;
}
.fileContainer [type=file] {
cursor: inherit;
display: block;
font-size: 999px;
filter: alpha(opacity=0);