Skip to content

Instantly share code, notes, and snippets.

View kitten's full-sized avatar

Phil Pluckthun kitten

View GitHub Profile
@kitten
kitten / cla.md
Last active January 15, 2025 11:43
MIT CLA

Individual Contributor License Agreement (CLA)

Thank you for submitting your contributions to this project.

By signing this CLA, you agree that the following terms apply to all of your past, present and future contributions to the project.

License.

You hereby represent that all present, past and future contributions are governed by the

@kitten
kitten / keybase.md
Last active February 26, 2018 07:38

Keybase proof

I hereby claim:

  • I am kitten on github.
  • I am philpl (https://keybase.io/philpl) on keybase.
  • I have a public key whose fingerprint is F846 DACD 264C 2FC5 6588 813B B8BE F6B3 7786 2FDE

To claim this, I am signing this object:

@kitten
kitten / result.js
Created March 15, 2017 01:09
babel-plugin-styled-components test with styled-components.github.io's App.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
var _react = require('react');
@kitten
kitten / before.js
Last active April 10, 2017 19:57
Spiking Static CSS Extraction for Styled Components (The Babel Plugin)
const Nested = styled.div`
width: 100%;
&:hover {
color: papayawhip;
background: ${p => p.bg};
}
transform: rotate(180deg);
`;
@kitten
kitten / reactiveconf-sc-cfp.md
Last active November 17, 2020 15:06
ReactiveConf 2017 Lightning Talk CFP: With styled-components into the future

styled-components Logo

With styled-components into the future

Preprocessing is dead, long live preprocessing!


This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf

const Header = styled.h1.attrs({
className: '...'
})`
box-shadow: ${p => p.shadow ? '0 2px 2px 0 #aaa' : 'none'};
`
@kitten
kitten / hyper.js
Last active May 30, 2018 21:15
hyper-nightowl colours/theme
module.exports = {
config: {
/* ... */
// font family with optional fallbacks
fontFamily: '"Dank Mono", "Fira Code", monospace',
fontWeight: 'normal',
fontWeightBold: 'normal',
fontSize: 14,
@kitten
kitten / setup-surfacebook-powertarget.sh
Last active June 30, 2022 01:42
Add systemd targets and services to set SB2 perf_mode
#!/bin/sh
echo "Creating systemd ac.target."
cat > /etc/systemd/system/ac.target << 'EOF'
[Unit]
Description=On AC power
DefaultDependencies=no
StopWhenUnneeded=yes
EOF
@kitten
kitten / urql-exchange-graphcache.md
Last active March 23, 2021 11:02
A short explainer on how Graphcache does what it does

How does it do the thing?!

There's two main caching modes that Graphcache does as part of the app's lifecycle:

  1. Querying results from the cache
  2. Writing results to the cache

We attempt query to query any query definition from the cache by default, unless it's been marked as network-only. In urql query operations are already marked as such and come from useQuery / client.executeQuery.

@kitten
kitten / ac.target
Last active October 6, 2022 01:54
Arch Files
# /etc/systemd/system/ac.target
[Unit]
Description=On AC power
DefaultDependencies=no
StopWhenUnneeded=yes