Skip to content

Instantly share code, notes, and snippets.

Avatar
🏳️‍🌈

James varjmes

🏳️‍🌈
  • London
  • 00:06 (UTC +01:00)
  • Twitter @varjmes
View GitHub Profile
@varjmes
varjmes / calm.js
Created March 25, 2021 22:39
Calm Mode Bookmarklet
View calm.js
javascript:(function () { const page = document.getElementsByTagName('html'); page[0].style.filter = 'saturate(50%)'})();
@varjmes
varjmes / blob.js
Last active March 31, 2019 10:39
Creating the tree!
View blob.js
class Blob {
constructor(data) {
this.data = data
}
type() {
return 'blob'
}
toString() {
@varjmes
varjmes / vrs.js
Created March 30, 2019 11:04
initialising a vrs (git) repository with ref and object directories
View vrs.js
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 / git-object-filenames.js
Created March 30, 2019 09:13
Calculating SHA-1's of various strings to replicate how git calculates object filenames
View git-object-filenames.js
// 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')
View why-ayo.txt
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
View actions.js
import axios from 'axios'
import getHost from '../../lib/getHost'
export const REQUEST_CATEGORY = 'REQUEST_CATEGORY'
function requestCategory (categoryId) {
return {
type: REQUEST_CATEGORY,
categoryId
}
}
@varjmes
varjmes / james_salsa.txt
Created July 10, 2017 20:04
James' Salsa
View james_salsa.txt
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
View package-lock.json
{
"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": {
View package.json
{
"name": "xxx",
"description": "xxx",
"bugs": {
"url": "xxx"
},
"author": "uSwitch Limited",
"contributors": [
"Charlotte Spencer <charlotte.spencer@uswitch.com>"
],
View 2017-06-05T09_28_59_031Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/Users/charlotte.spencer/.nvm/versions/node/v8.0.0/bin/node',
1 verbose cli '/Users/charlotte.spencer/.nvm/versions/node/v8.0.0/bin/npm',
1 verbose cli 'install' ]
2 info using npm@5.0.2
3 info using node@v8.0.0
4 silly install runPreinstallTopLevelLifecycles
5 silly preinstall mobiles-mirage@
6 info lifecycle mobiles-mirage@~preinstall: mobiles-mirage@
7 silly lifecycle mobiles-mirage@~preinstall: no script for preinstall, continuing