Skip to content

Instantly share code, notes, and snippets.

View pierrenel's full-sized avatar
:shipit:

Pierre Nel pierrenel

:shipit:
View GitHub Profile
@pierrenel
pierrenel / recover-schema.md
Created May 24, 2023 16:51 — forked from bjoerge/recover-schema.md
How to recover lost schema from *.sanity.studio.md

First, go to https://<yourname>.sanity.studio (or to the url of your studio if it's hosted elsewhere). Then open the developer console (usually by one of the keyboard shortcuts Command+Option+I, F12 or Control+Shift+I depending on what browser/platform you are using)

Steps

  1. Open the Sources tab
  2. Find the app.bundle.js file in the sidebar tree view.
  3. Hit the pretty print source button
  4. Locate your schema types by searching (e.g. try searching for one of your custom types) it in the source view.

Keybase proof

I hereby claim:

  • I am pierrenel on github.
  • I am pn (https://keybase.io/pn) on keybase.
  • I have a public key whose fingerprint is EA3B ACC7 BAF4 9F15 32B2 7E95 EFA5 9619 4C66 6AC9

To claim this, I am signing this object:

@pierrenel
pierrenel / useScrollProgress.js
Created July 11, 2019 19:15
useScrollProgress.js
import { useEffect, useState } from "react";
export default function useScrollProgress() {
const [width, setWidth] = useState(0);
useEffect(() => {
const onScroll = () => {
const {
scrollHeight,
clientHeight,
@pierrenel
pierrenel / combinators.js
Created February 22, 2018 19:27 — forked from Avaq/combinators.js
Common combinators in JavaScript
const I = x => x;
const K = x => y => x;
const A = f => x => f(x);
const T = x => f => f(x);
const W = f => x => f(x)(x);
const C = f => y => x => f(x)(y);
const B = f => g => x => f(g(x));
const S = f => g => x => f(x)(g(x));
const P = f => g => x => y => f(g(x))(g(y));
const Y = f => (g => g(g))(g => f(x => g(g)(x)));
@pierrenel
pierrenel / webpack.config.js
Created December 24, 2016 18:41
Pierre's webpack config for Strawberry Fields
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var DashboardPlugin = require('webpack-dashboard/plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: __dirname + '/src/index.jsx',
output: {
path: __dirname + '/dist',
filename: 'bundle.js',
@pierrenel
pierrenel / cloudSettings
Last active February 7, 2018 04:59
Visual Studio Code Sync Settings GIST
{"lastUpload":"2018-02-07T04:58:22.954Z","extensionVersion":"v2.8.7"}
@pierrenel
pierrenel / tmux.conf
Created June 25, 2015 14:39
tmux.conf
### INSTALLATION NOTES ###
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH

Minecraft Ultimate Tool Set

Requires creative mode or operator power on a multiplayer server. On a single player game (survival or hardcore), you will need "cheats" enabled to move into creative mode. Don't forget to leave creative mode when done.

These items might be stupid. Be prepared to repair the country-side.

<?php
/**
* I had to parse an XLSX spreadsheet (which should damn well have been a CSV!)
* but the usual tools were hitting the memory limit pretty quick. I found that
* manually parsing the XML worked pretty well. Note that this, most likely,
* won't work if cells contain anything more than text or a number (so formulas,
* graphs, etc ..., I don't know what'd happen).
*/
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2010 - 2014, Hailei Wang. All rights reserved.
colors = ximport( "colors" )
font( "Courier", 200 )
align( CENTER )
text_path_line_1 = textpath( "IDEO", 0, 200, width = WIDTH)
text_path_line_2 = textpath( "LABS", 0, 350, width = WIDTH)