Skip to content

Instantly share code, notes, and snippets.

View varjmes's full-sized avatar
🏳️‍🌈

James varjmes

🏳️‍🌈
View GitHub Profile
<html lang="en"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> </title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" crossorigin="anonymous" referrerpolicy="no-referrer">
<link rel="stylesheet" href="https://cdn.cache.lol/css/style.css">
<style>
body {
background-color: var(--violet-3) !important;
margin: var(--spacing);
@varjmes
varjmes / calm.js
Created March 25, 2021 22:39
Calm Mode Bookmarklet
javascript:(function () { const page = document.getElementsByTagName('html'); page[0].style.filter = 'saturate(50%)'})();
@varjmes
varjmes / git-object-filenames.js
Created March 30, 2019 09:13
Calculating SHA-1's of various strings to replicate how git calculates object filenames
// Calculating and printing the SHA-1 hash of strings
const crypto = require('crypto')
const zlib = require('zlib')
function hashIt(string) {
return crypto
.createHash('sha1')
.update(string, 'utf-8')
.digest('hex')
@varjmes
varjmes / vrs.js
Created March 30, 2019 11:04
initialising a vrs (git) repository with ref and object directories
const fs = require('fs')
const path = require('path')
const directories = ['objects', 'refs']
const command = process.argv[2]
switch (command) {
case 'init':
const repoPath = process.argv[3] || ''
const gitPath = path.resolve(repoPath, '.git')
@varjmes
varjmes / blob.js
Last active March 31, 2019 10:39
Creating the tree!
class Blob {
constructor(data) {
this.data = data
}
type() {
return 'blob'
}
toString() {
As a core member of the team: I believe that node is lacking in what it does to support its community, its governance model
is currently a mess and I don't feel that it is easy for the majority of people to contribute. This did not start and does
not end with whatever has been occurring in node over these past two weeks. These have been my feelings for over two years
now. I have experienced this first hand as a former part of node, as I sat within the now defunct Inclusivity Working Group.
It's time to try something new.
<3
@varjmes
varjmes / james_salsa.txt
Created July 10, 2017 20:04
James' Salsa
Tin of peeled plum tomatoes (incl. the juice!)
Fist of fresh coriander (cilantro for my US buds)
Half a brown onion
Half a garlic bulb
Half to 2/3 of a Jalapeño
2 Tablespoons of Olive Oil (don't get fancy with it)
Two shakes of black pepper (any shit will do)
Pinch of salt (any shit will do)
Chop the shit out of everything choppable
import axios from 'axios'
import getHost from '../../lib/getHost'
export const REQUEST_CATEGORY = 'REQUEST_CATEGORY'
function requestCategory (categoryId) {
return {
type: REQUEST_CATEGORY,
categoryId
}
}
{
"name": "mobiles-mirage",
"lockfileVersion": 1,
"dependencies": {
"accepts": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.3.tgz",
"integrity": "sha1-w8p0NJOGSMPg2cHjKN1otiLChMo="
},
"airbrake": {
{
"name": "xxx",
"description": "xxx",
"bugs": {
"url": "xxx"
},
"author": "uSwitch Limited",
"contributors": [
"Charlotte Spencer <charlotte.spencer@uswitch.com>"
],